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

Side by Side Diff: services/ui/test_wm/test_wm.cc

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « services/ui/service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "mojo/public/cpp/bindings/binding.h" 8 #include "mojo/public/cpp/bindings/binding.h"
9 #include "services/service_manager/public/c/main.h" 9 #include "services/service_manager/public/c/main.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
(...skipping 11 matching lines...) Expand all
22 22
23 class TestWM : public service_manager::Service, 23 class TestWM : public service_manager::Service,
24 public ui::WindowTreeClientDelegate, 24 public ui::WindowTreeClientDelegate,
25 public ui::WindowManagerDelegate { 25 public ui::WindowManagerDelegate {
26 public: 26 public:
27 TestWM() {} 27 TestWM() {}
28 ~TestWM() override {} 28 ~TestWM() override {}
29 29
30 private: 30 private:
31 // service_manager::Service: 31 // service_manager::Service:
32 void OnStart(service_manager::ServiceContext* context) override { 32 void OnStart() override {
33 window_tree_client_.reset(new ui::WindowTreeClient(this, this)); 33 window_tree_client_.reset(new ui::WindowTreeClient(this, this));
34 window_tree_client_->ConnectAsWindowManager(context->connector()); 34 window_tree_client_->ConnectAsWindowManager(context()->connector());
35 } 35 }
36 36
37 bool OnConnect(const service_manager::ServiceInfo& remote_info, 37 bool OnConnect(const service_manager::ServiceInfo& remote_info,
38 service_manager::InterfaceRegistry* registry) override { 38 service_manager::InterfaceRegistry* registry) override {
39 return false; 39 return false;
40 } 40 }
41 41
42 // ui::WindowTreeClientDelegate: 42 // ui::WindowTreeClientDelegate:
43 void OnEmbed(ui::Window* root) override { 43 void OnEmbed(ui::Window* root) override {
44 // WindowTreeClients configured as the window manager should never get 44 // WindowTreeClients configured as the window manager should never get
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 DISALLOW_COPY_AND_ASSIGN(TestWM); 112 DISALLOW_COPY_AND_ASSIGN(TestWM);
113 }; 113 };
114 114
115 } // namespace test 115 } // namespace test
116 } // namespace ui 116 } // namespace ui
117 117
118 MojoResult ServiceMain(MojoHandle service_request_handle) { 118 MojoResult ServiceMain(MojoHandle service_request_handle) {
119 service_manager::ServiceRunner runner(new ui::test::TestWM); 119 service_manager::ServiceRunner runner(new ui::test::TestWM);
120 return runner.Run(service_request_handle); 120 return runner.Run(service_request_handle);
121 } 121 }
OLDNEW
« no previous file with comments | « services/ui/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698