Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement display_handler::on_status_message for cef #6890

Merged
merged 1 commit into from Aug 2, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

implement display_handler::on_status_message for cef

  • Loading branch information
zmike
zmike committed Aug 1, 2015
commit a03a0cb9292de7ef64b33f634965bcfe57d40d7b
@@ -316,7 +316,24 @@ impl WindowMethods for Window {
browser.downcast().favicons.borrow_mut().push(url.to_string().clone());
}

fn status(&self, _: Option<String>) {
fn status(&self, info: Option<String>) {
let browser = self.cef_browser.borrow();
let browser = match *browser {
None => return,
Some(ref browser) => browser,
};
let str = match info {
Some(s) => {
let utf16_chars: Vec<u16> = Utf16Encoder::new(s.chars()).collect();
utf16_chars
}
None => vec![]
};

if check_ptr_exist!(browser.get_host().get_client(), get_display_handler) &&
check_ptr_exist!(browser.get_host().get_client().get_display_handler(), on_status_message) {
browser.get_host().get_client().get_display_handler().on_status_message((*browser).clone(), str.as_slice());
}
}

fn load_start(&self, back: bool, forward: bool) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.