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

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

Issue 400113005: A new WM bootstrap flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
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/public/cpp/application/application_connection.h" 5 #include "mojo/public/cpp/application/application_connection.h"
6 #include "mojo/public/cpp/application/application_delegate.h" 6 #include "mojo/public/cpp/application/application_delegate.h"
7 #include "mojo/services/view_manager/view_manager_init_service_context.h"
7 #include "mojo/services/view_manager/view_manager_init_service_impl.h" 8 #include "mojo/services/view_manager/view_manager_init_service_impl.h"
8 9
9 namespace mojo { 10 namespace mojo {
10 namespace view_manager { 11 namespace view_manager {
11 namespace service { 12 namespace service {
12 13
13 class ViewManagerApp : public ApplicationDelegate { 14 class ViewManagerApp : public ApplicationDelegate {
14 public: 15 public:
15 ViewManagerApp() {} 16 ViewManagerApp() {}
16 virtual ~ViewManagerApp() {} 17 virtual ~ViewManagerApp() {}
17 18
18 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) 19 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
19 MOJO_OVERRIDE { 20 MOJO_OVERRIDE {
21 context_.ConfigureIncomingConnection(connection);
20 // TODO(sky): this needs some sort of authentication as well as making sure 22 // TODO(sky): this needs some sort of authentication as well as making sure
21 // we only ever have one active at a time. 23 // we only ever have one active at a time.
22 connection->AddService<ViewManagerInitServiceImpl>(); 24 connection->AddService<ViewManagerInitServiceImpl>(&context_);
23 return true; 25 return true;
24 } 26 }
25 27
26 private: 28 private:
29 ViewManagerInitServiceContext context_;
30
27 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp); 31 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
28 }; 32 };
29 33
30 } // namespace service 34 } // namespace service
31 } // namespace view_manager 35 } // namespace view_manager
32 36
33 // static 37 // static
34 ApplicationDelegate* ApplicationDelegate::Create() { 38 ApplicationDelegate* ApplicationDelegate::Create() {
35 return new mojo::view_manager::service::ViewManagerApp(); 39 return new mojo::view_manager::service::ViewManagerApp();
36 } 40 }
37 41
38 } // namespace mojo 42 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698