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

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

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
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/application_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( 26 bool ShellApplicationDelegate::AcceptConnection(Connection* connection) {
27 ApplicationConnection* connection) {
28 connection->AddService<mojom::ApplicationManager>(this); 27 connection->AddService<mojom::ApplicationManager>(this);
29 return true; 28 return true;
30 } 29 }
31 30
32 void ShellApplicationDelegate::Create( 31 void ShellApplicationDelegate::Create(
33 ApplicationConnection* connection, 32 Connection* connection,
34 InterfaceRequest<mojom::ApplicationManager> request) { 33 InterfaceRequest<mojom::ApplicationManager> request) {
35 bindings_.AddBinding(this, std::move(request)); 34 bindings_.AddBinding(this, std::move(request));
36 } 35 }
37 36
38 void ShellApplicationDelegate::CreateInstanceForHandle( 37 void ShellApplicationDelegate::CreateInstanceForHandle(
39 ScopedHandle channel, 38 ScopedHandle channel,
40 const String& url, 39 const String& url,
41 mojom::CapabilityFilterPtr filter, 40 mojom::CapabilityFilterPtr filter,
42 InterfaceRequest<mojom::PIDReceiver> pid_receiver) { 41 InterfaceRequest<mojom::PIDReceiver> pid_receiver) {
43 manager_->CreateInstanceForHandle(std::move(channel), GURL(url.get()), 42 manager_->CreateInstanceForHandle(std::move(channel), GURL(url.get()),
44 std::move(filter), std::move(pid_receiver)); 43 std::move(filter), std::move(pid_receiver));
45 } 44 }
46 45
47 void ShellApplicationDelegate::AddListener( 46 void ShellApplicationDelegate::AddListener(
48 mojom::ApplicationManagerListenerPtr listener) { 47 mojom::ApplicationManagerListenerPtr listener) {
49 manager_->AddListener(std::move(listener)); 48 manager_->AddListener(std::move(listener));
50 } 49 }
51 50
52 } // namespace shell 51 } // namespace shell
53 } // namespace mojo 52 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/shell_application_delegate.h ('k') | mojo/shell/standalone/android/android_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698