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

Side by Side Diff: mojo/services/view_manager/main.cc

Issue 667223002: Mojo: More virtual/override style fixes in mojo/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/application/application_runner_chromium.h" 5 #include "mojo/application/application_runner_chromium.h"
6 #include "mojo/public/c/system/main.h" 6 #include "mojo/public/c/system/main.h"
7 #include "mojo/public/cpp/application/application_connection.h" 7 #include "mojo/public/cpp/application/application_connection.h"
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/services/view_manager/view_manager_init_service_context.h" 9 #include "mojo/services/view_manager/view_manager_init_service_context.h"
10 #include "mojo/services/view_manager/view_manager_init_service_impl.h" 10 #include "mojo/services/view_manager/view_manager_init_service_impl.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace service { 13 namespace service {
14 14
15 class ViewManagerApp : public ApplicationDelegate, 15 class ViewManagerApp : public ApplicationDelegate,
16 public InterfaceFactory<ViewManagerInitService> { 16 public InterfaceFactory<ViewManagerInitService> {
17 public: 17 public:
18 ViewManagerApp() {} 18 ViewManagerApp() {}
19 virtual ~ViewManagerApp() {} 19 ~ViewManagerApp() override {}
20 20
21 virtual bool ConfigureIncomingConnection( 21 bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
22 ApplicationConnection* connection) override {
23 context_.ConfigureIncomingConnection(connection); 22 context_.ConfigureIncomingConnection(connection);
24 // TODO(sky): this needs some sort of authentication as well as making sure 23 // TODO(sky): this needs some sort of authentication as well as making sure
25 // we only ever have one active at a time. 24 // we only ever have one active at a time.
26 connection->AddService(this); 25 connection->AddService(this);
27 return true; 26 return true;
28 } 27 }
29 28
30 virtual void Create( 29 void Create(ApplicationConnection* connection,
31 ApplicationConnection* connection, 30 InterfaceRequest<ViewManagerInitService> request) override {
32 InterfaceRequest<ViewManagerInitService> request) override {
33 BindToRequest(new ViewManagerInitServiceImpl(connection, &context_), 31 BindToRequest(new ViewManagerInitServiceImpl(connection, &context_),
34 &request); 32 &request);
35 } 33 }
36 34
37 private: 35 private:
38 ViewManagerInitServiceContext context_; 36 ViewManagerInitServiceContext context_;
39 37
40 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp); 38 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
41 }; 39 };
42 40
43 } // namespace service 41 } // namespace service
44 } // namespace mojo 42 } // namespace mojo
45 43
46 MojoResult MojoMain(MojoHandle shell_handle) { 44 MojoResult MojoMain(MojoHandle shell_handle) {
47 mojo::ApplicationRunnerChromium runner(new mojo::service::ViewManagerApp); 45 mojo::ApplicationRunnerChromium runner(new mojo::service::ViewManagerApp);
48 return runner.Run(shell_handle); 46 return runner.Run(shell_handle);
49 } 47 }
OLDNEW
« no previous file with comments | « mojo/services/view_manager/display_manager.h ('k') | mojo/services/view_manager/view_manager_init_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698