mirror of
https://github.com/servo/servo.git
synced 2025-07-14 02:43:42 +01:00
implement cef_browser_host_t::get_browser() method
This commit is contained in:
parent
28968023ba
commit
c1d6d6fe1c
1 changed files with 5 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use eutil::Downcast;
|
||||
use interfaces::{CefBrowser, CefBrowserHost, CefClient, cef_browser_host_t, cef_client_t};
|
||||
use interfaces::{CefBrowser, CefBrowserHost, CefClient, cef_browser_t, cef_browser_host_t, cef_client_t};
|
||||
use types::{cef_mouse_button_type_t, cef_mouse_event, cef_rect_t, cef_key_event};
|
||||
use types::cef_key_event_type_t::{KEYEVENT_CHAR, KEYEVENT_KEYDOWN, KEYEVENT_KEYUP, KEYEVENT_RAWKEYDOWN};
|
||||
use browser::{self, ServoCefBrowserExtensions};
|
||||
|
@ -28,6 +28,10 @@ full_cef_class_impl! {
|
|||
fn get_client(&this,) -> *mut cef_client_t {{
|
||||
this.downcast().client.clone()
|
||||
}}
|
||||
fn get_browser(&this,) -> *mut cef_browser_t {{
|
||||
let browser = this.downcast().browser.borrow_mut();
|
||||
browser.clone().unwrap()
|
||||
}}
|
||||
|
||||
fn was_resized(&this,) -> () {{
|
||||
let mut rect = cef_rect_t::zero();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue