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

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

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (Closed)
Patch Set: . 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') | services/video_capture/video_capture_service.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 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 10 matching lines...) Expand all
21 21
22 class TestWM : public service_manager::Service, 22 class TestWM : public service_manager::Service,
23 public ui::WindowTreeClientDelegate, 23 public ui::WindowTreeClientDelegate,
24 public ui::WindowManagerDelegate { 24 public ui::WindowManagerDelegate {
25 public: 25 public:
26 TestWM() {} 26 TestWM() {}
27 ~TestWM() override {} 27 ~TestWM() override {}
28 28
29 private: 29 private:
30 // service_manager::Service: 30 // service_manager::Service:
31 void OnStart(const service_manager::Identity& identity) override { 31 void OnStart(const service_manager::ServiceInfo& info) override {
32 window_tree_client_.reset(new ui::WindowTreeClient(this, this)); 32 window_tree_client_.reset(new ui::WindowTreeClient(this, this));
33 window_tree_client_->ConnectAsWindowManager(connector()); 33 window_tree_client_->ConnectAsWindowManager(connector());
34 } 34 }
35 35
36 // ui::WindowTreeClientDelegate: 36 // ui::WindowTreeClientDelegate:
37 void OnEmbed(ui::Window* root) override { 37 void OnEmbed(ui::Window* root) override {
38 // WindowTreeClients configured as the window manager should never get 38 // WindowTreeClients configured as the window manager should never get
39 // OnEmbed(). 39 // OnEmbed().
40 NOTREACHED(); 40 NOTREACHED();
41 } 41 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DISALLOW_COPY_AND_ASSIGN(TestWM); 106 DISALLOW_COPY_AND_ASSIGN(TestWM);
107 }; 107 };
108 108
109 } // namespace test 109 } // namespace test
110 } // namespace ui 110 } // namespace ui
111 111
112 MojoResult ServiceMain(MojoHandle service_request_handle) { 112 MojoResult ServiceMain(MojoHandle service_request_handle) {
113 service_manager::ServiceRunner runner(new ui::test::TestWM); 113 service_manager::ServiceRunner runner(new ui::test::TestWM);
114 return runner.Run(service_request_handle); 114 return runner.Run(service_request_handle);
115 } 115 }
OLDNEW
« no previous file with comments | « services/ui/service.cc ('k') | services/video_capture/video_capture_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698