pub struct ChromeExtBridge { /* private fields */ }Expand description
The Chrome Extension API bridge.
Implementations§
Source§impl ChromeExtBridge
impl ChromeExtBridge
Sourcepub fn new(
manifest: Manifest,
profile: AnalysisProfile,
state: ExtensionState,
) -> Self
pub fn new( manifest: Manifest, profile: AnalysisProfile, state: ExtensionState, ) -> Self
Create a new bridge with the given manifest, profile, and state.
Sourcepub fn take_observations(&self) -> Vec<Observation>
pub fn take_observations(&self) -> Vec<Observation>
Drain collected observations. CRITICAL FIX: Handle poisoned mutex - recover data even if another thread panicked.
Trait Implementations§
Source§impl Bridge for ChromeExtBridge
impl Bridge for ChromeExtBridge
Source§fn call(&self, api: &str, args: &[Value]) -> Result<Value, String>
fn call(&self, api: &str, args: &[Value]) -> Result<Value, String>
Handle a function call from JavaScript. Read more
Source§fn get_property(&self, object: &str, property: &str) -> Result<Value, String>
fn get_property(&self, object: &str, property: &str) -> Result<Value, String>
Handle a property read from JavaScript. Read more
Source§fn set_property(
&self,
object: &str,
property: &str,
value: &Value,
) -> Result<(), String>
fn set_property( &self, object: &str, property: &str, value: &Value, ) -> Result<(), String>
Handle a property write from JavaScript. Read more
Source§fn provided_globals(&self) -> Vec<String>
fn provided_globals(&self) -> Vec<String>
Return the list of global objects this bridge provides. Read more
Source§fn bootstrap_js(&self) -> String
fn bootstrap_js(&self) -> String
Return the JS bootstrap code that installs this bridge’s API surface. Read more
Auto Trait Implementations§
impl Freeze for ChromeExtBridge
impl RefUnwindSafe for ChromeExtBridge
impl Send for ChromeExtBridge
impl Sync for ChromeExtBridge
impl Unpin for ChromeExtBridge
impl UnsafeUnpin for ChromeExtBridge
impl UnwindSafe for ChromeExtBridge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more