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

Side by Side Diff: mojo/shell/shell_application_delegate.cc

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/shell/shell_application_delegate.h" 5 #include "mojo/shell/shell_application_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/process/process.h" 11 #include "base/process/process.h"
12 #include "mojo/shell/application_manager.h" 12 #include "mojo/shell/application_manager.h"
13 #include "mojo/shell/public/cpp/connection.h" 13 #include "mojo/shell/public/cpp/connection.h"
14 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" 14 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace shell { 17 namespace shell {
18 18
19 ShellApplicationDelegate::ShellApplicationDelegate( 19 ShellApplicationDelegate::ShellApplicationDelegate(
20 mojo::shell::ApplicationManager* manager) 20 mojo::shell::ApplicationManager* manager)
21 : manager_(manager) {} 21 : manager_(manager) {}
22 ShellApplicationDelegate::~ShellApplicationDelegate() {} 22 ShellApplicationDelegate::~ShellApplicationDelegate() {}
23 23
24 void ShellApplicationDelegate::Initialize(Shell* shell, const std::string& url, 24 void ShellApplicationDelegate::Initialize(Shell* shell, const std::string& url,
25 uint32_t id) {} 25 uint32_t id) {}
26 bool ShellApplicationDelegate::AcceptConnection(Connection* connection) { 26 bool ShellApplicationDelegate::AcceptConnection(Connection* connection) {
27 connection->AddService<mojom::ApplicationManager>(this); 27 connection->AddInterface<mojom::ApplicationManager>(this);
28 return true; 28 return true;
29 } 29 }
30 30
31 void ShellApplicationDelegate::Create( 31 void ShellApplicationDelegate::Create(
32 Connection* connection, 32 Connection* connection,
33 InterfaceRequest<mojom::ApplicationManager> request) { 33 InterfaceRequest<mojom::ApplicationManager> request) {
34 bindings_.AddBinding(this, std::move(request)); 34 bindings_.AddBinding(this, std::move(request));
35 } 35 }
36 36
37 void ShellApplicationDelegate::CreateInstanceForHandle( 37 void ShellApplicationDelegate::CreateInstanceForHandle(
38 ScopedHandle channel, 38 ScopedHandle channel,
39 const String& url, 39 const String& url,
40 mojom::CapabilityFilterPtr filter, 40 mojom::CapabilityFilterPtr filter,
41 InterfaceRequest<mojom::PIDReceiver> pid_receiver) { 41 InterfaceRequest<mojom::PIDReceiver> pid_receiver) {
42 manager_->CreateInstanceForHandle(std::move(channel), GURL(url.get()), 42 manager_->CreateInstanceForHandle(std::move(channel), GURL(url.get()),
43 std::move(filter), std::move(pid_receiver)); 43 std::move(filter), std::move(pid_receiver));
44 } 44 }
45 45
46 void ShellApplicationDelegate::AddListener( 46 void ShellApplicationDelegate::AddListener(
47 mojom::ApplicationManagerListenerPtr listener) { 47 mojom::ApplicationManagerListenerPtr listener) {
48 manager_->AddListener(std::move(listener)); 48 manager_->AddListener(std::move(listener));
49 } 49 }
50 50
51 } // namespace shell 51 } // namespace shell
52 } // namespace mojo 52 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/runner/child/native_apptest_target.cc ('k') | mojo/shell/standalone/android/android_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698