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

Side by Side Diff: mandoline/services/updater/updater_app.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
« no previous file with comments | « mandoline/services/updater/updater_app.h ('k') | mandoline/ui/desktop_ui/browser_manager.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 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 "mandoline/services/updater/updater_app.h" 5 #include "mandoline/services/updater/updater_app.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mandoline/services/updater/updater_impl.h" 10 #include "mandoline/services/updater/updater_impl.h"
11 #include "mojo/public/c/system/main.h" 11 #include "mojo/public/c/system/main.h"
12 #include "mojo/shell/public/cpp/application_connection.h"
13 #include "mojo/shell/public/cpp/application_runner.h" 12 #include "mojo/shell/public/cpp/application_runner.h"
13 #include "mojo/shell/public/cpp/connection.h"
14 #include "mojo/shell/public/cpp/shell.h" 14 #include "mojo/shell/public/cpp/shell.h"
15 15
16 namespace updater { 16 namespace updater {
17 17
18 UpdaterApp::UpdaterApp() : shell_(nullptr) { 18 UpdaterApp::UpdaterApp() : shell_(nullptr) {
19 } 19 }
20 20
21 UpdaterApp::~UpdaterApp() { 21 UpdaterApp::~UpdaterApp() {
22 } 22 }
23 23
24 void UpdaterApp::Initialize(mojo::Shell* shell, const std::string& url, 24 void UpdaterApp::Initialize(mojo::Shell* shell, const std::string& url,
25 uint32_t id) { 25 uint32_t id) {
26 shell_ = shell; 26 shell_ = shell;
27 } 27 }
28 28
29 bool UpdaterApp::AcceptConnection( 29 bool UpdaterApp::AcceptConnection(mojo::Connection* connection) {
30 mojo::ApplicationConnection* connection) {
31 connection->AddService<Updater>(this); 30 connection->AddService<Updater>(this);
32 return true; 31 return true;
33 } 32 }
34 33
35 void UpdaterApp::Create(mojo::ApplicationConnection* connection, 34 void UpdaterApp::Create(mojo::Connection* connection,
36 mojo::InterfaceRequest<Updater> request) { 35 mojo::InterfaceRequest<Updater> request) {
37 new UpdaterImpl(this, std::move(request)); 36 new UpdaterImpl(this, std::move(request));
38 } 37 }
39 38
40 } // namespace updater 39 } // namespace updater
41 40
42 MojoResult MojoMain(MojoHandle shell_handle) { 41 MojoResult MojoMain(MojoHandle shell_handle) {
43 mojo::ApplicationRunner runner(new updater::UpdaterApp); 42 mojo::ApplicationRunner runner(new updater::UpdaterApp);
44 return runner.Run(shell_handle); 43 return runner.Run(shell_handle);
45 } 44 }
OLDNEW
« no previous file with comments | « mandoline/services/updater/updater_app.h ('k') | mandoline/ui/desktop_ui/browser_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698