Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Side by Side Diff: content/common/mojo/mojo_shell_connection_impl.cc

Issue 2179023004: Make Service own ServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | mash/app_driver/app_driver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/mojo/mojo_shell_connection_impl.h" 5 #include "content/common/mojo/mojo_shell_connection_impl.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 void OnBrowserConnectionLost() { 145 void OnBrowserConnectionLost() {
146 DCHECK(io_thread_checker_.CalledOnValidThread()); 146 DCHECK(io_thread_checker_.CalledOnValidThread());
147 browser_connection_ = nullptr; 147 browser_connection_ = nullptr;
148 } 148 }
149 149
150 ///////////////////////////////////////////////////////////////////////////// 150 /////////////////////////////////////////////////////////////////////////////
151 // shell::Service implementation 151 // shell::Service implementation
152 152
153 void OnStart(shell::Connector* connector, 153 void OnStart(const shell::Identity& identity) override {
154 const shell::Identity& identity,
155 uint32_t id) override {
156 DCHECK(io_thread_checker_.CalledOnValidThread()); 154 DCHECK(io_thread_checker_.CalledOnValidThread());
157 DCHECK(!initialize_handler_.is_null()); 155 DCHECK(!initialize_handler_.is_null());
158 156
159 InitializeCallback handler = base::ResetAndReturn(&initialize_handler_); 157 InitializeCallback handler = base::ResetAndReturn(&initialize_handler_);
160 callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity)); 158 callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity));
161 } 159 }
162 160
163 bool OnConnect(shell::Connection* connection) override { 161 bool OnConnect(shell::Connection* connection) override {
164 DCHECK(io_thread_checker_.CalledOnValidThread()); 162 DCHECK(io_thread_checker_.CalledOnValidThread());
165 std::string remote_app = connection->GetRemoteIdentity().name(); 163 std::string remote_app = connection->GetRemoteIdentity().name();
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 439 }
442 440
443 void MojoShellConnectionImpl::GetInterface( 441 void MojoShellConnectionImpl::GetInterface(
444 shell::mojom::InterfaceProvider* provider, 442 shell::mojom::InterfaceProvider* provider,
445 const mojo::String& interface_name, 443 const mojo::String& interface_name,
446 mojo::ScopedMessagePipeHandle request_handle) { 444 mojo::ScopedMessagePipeHandle request_handle) {
447 provider->GetInterface(interface_name, std::move(request_handle)); 445 provider->GetInterface(interface_name, std::move(request_handle));
448 } 446 }
449 447
450 } // namespace content 448 } // namespace content
OLDNEW
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | mash/app_driver/app_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698