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

Allow embedders to provide user agent string #25672

Closed
wants to merge 8 commits into from

Fix formatting

  • Loading branch information
mediremi committed Feb 1, 2020
commit 8a03db7de2a414bc057b9bd19c0aedfc8210c767
@@ -493,7 +493,7 @@ pub struct Constellation<Message, LTF, STF> {
active_media_session: Option<PipelineId>,

/// User agent string
pub user_agent: Cow<'static, str>
pub user_agent: Cow<'static, str>,
}

/// State needed to construct a constellation.
@@ -552,7 +552,7 @@ pub struct InitialConstellationState {
pub event_loop_waker: Option<Box<dyn EventLoopWaker>>,

/// User agent string
pub user_agent: Cow<'static, str>
pub user_agent: Cow<'static, str>,
}

/// Data needed for webdriver
@@ -1234,7 +1234,7 @@ where
webxr_registry: self.webxr_registry.clone(),
player_context: self.player_context.clone(),
event_loop_waker: self.event_loop_waker.as_ref().map(|w| (*w).clone_box()),
user_agent: self.user_agent.clone()
user_agent: self.user_agent.clone(),
});

let pipeline = match result {
@@ -207,7 +207,7 @@ pub struct InitialPipelineState {
pub event_loop_waker: Option<Box<dyn EventLoopWaker>>,

/// User agent string
pub user_agent: Cow<'static, str>
pub user_agent: Cow<'static, str>,
}

pub struct NewPipeline {
@@ -311,7 +311,7 @@ impl Pipeline {
webvr_chan: state.webvr_chan,
webxr_registry: state.webxr_registry,
player_context: state.player_context,
user_agent: state.user_agent
user_agent: state.user_agent,
};

// Spawn the child process.
@@ -519,7 +519,7 @@ pub struct UnprivilegedPipelineContent {
webvr_chan: Option<IpcSender<WebVRMsg>>,
webxr_registry: webxr_api::Registry,
player_context: WindowGLContext,
user_agent: Cow<'static, str>
user_agent: Cow<'static, str>,
}

impl UnprivilegedPipelineContent {
@@ -576,7 +576,7 @@ impl UnprivilegedPipelineContent {
layout_is_busy: layout_thread_busy_flag.clone(),
player_context: self.player_context.clone(),
event_loop_waker,
user_agent: self.user_agent
user_agent: self.user_agent,
},
self.load_data.clone(),
self.opts.profile_script_events,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.