update various cef functions to use correct number of params

cef broke abi/api recently
This commit is contained in:
Mike Blumenkrantz 2015-05-05 17:05:52 -04:00
parent ba8c585372
commit c62b7236a9
5 changed files with 20 additions and 10 deletions

View file

@ -2,15 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use interfaces::cef_cookie_manager_t; use interfaces::{cef_completion_callback_t, cef_cookie_manager_t};
use types::cef_string_t; use types::cef_string_t;
use libc::c_int; use libc::c_int;
cef_stub_static_method_impls! { cef_stub_static_method_impls! {
fn cef_cookie_manager_get_global_manager() -> *mut cef_cookie_manager_t fn cef_cookie_manager_get_global_manager(callback: *mut cef_completion_callback_t) -> *mut cef_cookie_manager_t
fn cef_cookie_manager_create_manager(path: *const cef_string_t, fn cef_cookie_manager_create_manager(path: *const cef_string_t,
persist_session_cookies: c_int) persist_session_cookies: c_int,
callback: *mut cef_completion_callback_t)
-> *mut cef_cookie_manager_t -> *mut cef_cookie_manager_t
} }

View file

@ -2,11 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use interfaces::{cef_request_context_handler_t, cef_request_context_t}; use interfaces::{cef_request_context_handler_t, cef_request_context_t, cef_request_context_settings_t};
cef_stub_static_method_impls! { cef_stub_static_method_impls! {
fn cef_request_context_get_global_context() -> *mut cef_request_context_t fn cef_request_context_get_global_context() -> *mut cef_request_context_t
fn cef_request_context_create_context(_handler: *mut cef_request_context_handler_t) fn cef_request_context_create_context(_settings: *const cef_request_context_settings_t,
_handler: *mut cef_request_context_handler_t)
-> *mut cef_request_context_t
fn cef_request_context_create_context_shared(_other: *mut cef_request_context_t,
_handler: *mut cef_request_context_handler_t)
-> *mut cef_request_context_t -> *mut cef_request_context_t
} }

View file

@ -2,11 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use interfaces::{cef_request_t, cef_urlrequest_client_t, cef_urlrequest_t}; use interfaces::{cef_request_t, cef_request_context_t, cef_urlrequest_client_t, cef_urlrequest_t};
#[no_mangle] #[no_mangle]
pub extern "C" fn cef_urlrequest_create(_request: *mut cef_request_t, pub extern "C" fn cef_urlrequest_create(_request: *mut cef_request_t,
_client: *mut cef_urlrequest_client_t) _client: *mut cef_urlrequest_client_t,
_context: *mut cef_request_context_t)
-> *mut cef_urlrequest_t { -> *mut cef_urlrequest_t {
0 as *mut cef_urlrequest_t 0 as *mut cef_urlrequest_t
} }

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use interfaces::{cef_binary_value_t, cef_dictionary_value_t, cef_list_value_t}; use interfaces::{cef_binary_value_t, cef_dictionary_value_t, cef_list_value_t, cef_value_t};
use libc; use libc;
@ -10,5 +10,6 @@ cef_stub_static_method_impls! {
fn cef_binary_value_create(_data: *const (), _size: libc::size_t) -> *mut cef_binary_value_t fn cef_binary_value_create(_data: *const (), _size: libc::size_t) -> *mut cef_binary_value_t
fn cef_dictionary_value_create() -> *mut cef_dictionary_value_t fn cef_dictionary_value_create() -> *mut cef_dictionary_value_t
fn cef_list_value_create() -> *mut cef_list_value_t fn cef_list_value_create() -> *mut cef_list_value_t
fn cef_value_create() -> *mut cef_value_t
} }

View file

@ -11,7 +11,7 @@ use eutil::Downcast;
use interfaces::CefBrowser; use interfaces::CefBrowser;
use render_handler::CefRenderHandlerExtensions; use render_handler::CefRenderHandlerExtensions;
use rustc_unicode::str::Utf16Encoder; use rustc_unicode::str::Utf16Encoder;
use types::{cef_cursor_handle_t, cef_rect_t}; use types::{cef_cursor_handle_t, cef_cursor_type_t, cef_rect_t};
use compositing::compositor_task::{self, CompositorProxy, CompositorReceiver}; use compositing::compositor_task::{self, CompositorProxy, CompositorReceiver};
use compositing::windowing::{WindowEvent, WindowMethods}; use compositing::windowing::{WindowEvent, WindowMethods};
@ -307,15 +307,18 @@ impl WindowMethods for Window {
} }
fn set_cursor(&self, cursor: Cursor) { fn set_cursor(&self, cursor: Cursor) {
use types::{CefCursorInfo,cef_point_t,cef_size_t};
let browser = self.cef_browser.borrow(); let browser = self.cef_browser.borrow();
match *browser { match *browser {
None => {} None => {}
Some(ref browser) => { Some(ref browser) => {
let cursor_handle = self.cursor_handle_for_cursor(cursor); let cursor_handle = self.cursor_handle_for_cursor(cursor);
let info = CefCursorInfo { hotspot: cef_point_t {x: 0, y: 0}, image_scale_factor: 0.0, buffer: 0 as *mut isize, size: cef_size_t { width: 0, height: 0 } };
browser.get_host() browser.get_host()
.get_client() .get_client()
.get_render_handler() .get_render_handler()
.on_cursor_change(browser.clone(), cursor_handle) .on_cursor_change(browser.clone(), cursor_handle,
CT_POINTER, &info)
} }
} }
} }