mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
update cef embedding interfaces to latest cef
This commit is contained in:
parent
49aed6555d
commit
4679fc77b0
57 changed files with 3731 additions and 738 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -164,6 +164,13 @@ pub struct _cef_request_t {
|
|||
pub get_transition_type: Option<extern "C" fn(
|
||||
this: *mut cef_request_t) -> types::cef_transition_type_t>,
|
||||
|
||||
//
|
||||
// Returns the globally unique identifier for this request or 0 if not
|
||||
// specified. Can be used by cef_request_tHandler implementations in the
|
||||
// browser process to track a single request across multiple callbacks.
|
||||
//
|
||||
pub get_identifier: Option<extern "C" fn(this: *mut cef_request_t) -> u64>,
|
||||
|
||||
//
|
||||
// The reference count. This will only be present for Rust instances!
|
||||
//
|
||||
|
@ -493,6 +500,22 @@ impl CefRequest {
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Returns the globally unique identifier for this request or 0 if not
|
||||
// specified. Can be used by cef_request_tHandler implementations in the
|
||||
// browser process to track a single request across multiple callbacks.
|
||||
//
|
||||
pub fn get_identifier(&self) -> u64 {
|
||||
if self.c_object.is_null() {
|
||||
panic!("called a CEF method on a null object")
|
||||
}
|
||||
unsafe {
|
||||
CefWrap::to_rust(
|
||||
((*self.c_object).get_identifier.unwrap())(
|
||||
self.c_object))
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Create a new cef_request_t object.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue