diff options
Diffstat (limited to 'mojo/shell/background')
-rw-r--r-- | mojo/shell/background/background_shell.cc | 14 | ||||
-rw-r--r-- | mojo/shell/background/background_shell.h | 7 |
2 files changed, 9 insertions, 12 deletions
diff --git a/mojo/shell/background/background_shell.cc b/mojo/shell/background/background_shell.cc index 0fdba19..3a56c81 100644 --- a/mojo/shell/background/background_shell.cc +++ b/mojo/shell/background/background_shell.cc @@ -72,10 +72,9 @@ class MojoMessageLoop : public base::MessageLoop { // Manages the thread to startup mojo. class BackgroundShell::MojoThread : public base::SimpleThread { public: - explicit MojoThread( - const std::vector<CommandLineSwitch>& command_line_switches) + explicit MojoThread(NativeRunnerDelegate* native_runner_delegate) : SimpleThread("mojo-background-shell"), - command_line_switches_(command_line_switches) {} + native_runner_delegate_(native_runner_delegate) {} ~MojoThread() override {} void CreateShellClientRequest(base::WaitableEvent* signal, @@ -126,7 +125,7 @@ class BackgroundShell::MojoThread : public base::SimpleThread { scoped_ptr<Context> context(new Context); context_ = context.get(); - context_->set_command_line_switches(command_line_switches_); + context_->set_native_runner_delegate(native_runner_delegate_); context_->Init(shell_dir); message_loop_->Run(); @@ -156,7 +155,7 @@ class BackgroundShell::MojoThread : public base::SimpleThread { // Created in Run() on the background thread. Context* context_ = nullptr; - const std::vector<CommandLineSwitch> command_line_switches_; + NativeRunnerDelegate* native_runner_delegate_; DISALLOW_COPY_AND_ASSIGN(MojoThread); }; @@ -167,10 +166,9 @@ BackgroundShell::~BackgroundShell() { thread_->Stop(); } -void BackgroundShell::Init( - const std::vector<CommandLineSwitch>& command_line_switches) { +void BackgroundShell::Init(NativeRunnerDelegate* native_runner_delegate) { DCHECK(!thread_); - thread_.reset(new MojoThread(command_line_switches)); + thread_.reset(new MojoThread(native_runner_delegate)); thread_->Start(); } diff --git a/mojo/shell/background/background_shell.h b/mojo/shell/background/background_shell.h index d1e9c41..e04d282 100644 --- a/mojo/shell/background/background_shell.h +++ b/mojo/shell/background/background_shell.h @@ -17,7 +17,7 @@ class GURL; namespace mojo { namespace shell { -struct CommandLineSwitch; +class NativeRunnerDelegate; // BackgroundShell starts up the mojo shell on a background thread, and // destroys the thread in the destructor. Once created use CreateApplication() @@ -28,9 +28,8 @@ class BackgroundShell { BackgroundShell(); ~BackgroundShell(); - // Starts the background shell. |command_line_switches| are additional - // switches applied to any processes spawned by this call. - void Init(const std::vector<CommandLineSwitch>& command_line_switches); + // Starts the background shell. + void Init(NativeRunnerDelegate* native_runner_delegate); // Obtains an InterfaceRequest for the specified url. InterfaceRequest<mojom::ShellClient> CreateShellClientRequest( |