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

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

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 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
« no previous file with comments | « services/ui/service.cc ('k') | services/ui/ws/display.cc » ('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"
11 #include "services/service_manager/public/cpp/service.h" 11 #include "services/service_manager/public/cpp/service.h"
12 #include "services/service_manager/public/cpp/service_runner.h" 12 #include "services/service_manager/public/cpp/service_runner.h"
13 #include "services/ui/public/cpp/window.h" 13 #include "services/ui/public/cpp/window.h"
14 #include "services/ui/public/cpp/window_manager_delegate.h" 14 #include "services/ui/public/cpp/window_manager_delegate.h"
15 #include "services/ui/public/cpp/window_tree_client.h" 15 #include "services/ui/public/cpp/window_tree_client.h"
16 #include "services/ui/public/cpp/window_tree_client_delegate.h" 16 #include "services/ui/public/cpp/window_tree_client_delegate.h"
17 #include "ui/display/display.h" 17 #include "ui/display/display.h"
18 18
19 namespace ui { 19 namespace ui {
20 namespace test { 20 namespace test {
21 21
22 class TestWM : public shell::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 // shell::Service: 30 // service_manager::Service:
31 void OnStart(const shell::Identity& identity) override { 31 void OnStart(const service_manager::Identity& identity) 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ui::WindowManagerClient* window_manager_client_ = nullptr; 102 ui::WindowManagerClient* window_manager_client_ = nullptr;
103 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; 103 std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(TestWM); 105 DISALLOW_COPY_AND_ASSIGN(TestWM);
106 }; 106 };
107 107
108 } // namespace test 108 } // namespace test
109 } // namespace ui 109 } // namespace ui
110 110
111 MojoResult ServiceMain(MojoHandle service_request_handle) { 111 MojoResult ServiceMain(MojoHandle service_request_handle) {
112 shell::ServiceRunner runner(new ui::test::TestWM); 112 service_manager::ServiceRunner runner(new ui::test::TestWM);
113 return runner.Run(service_request_handle); 113 return runner.Run(service_request_handle);
114 } 114 }
OLDNEW
« no previous file with comments | « services/ui/service.cc ('k') | services/ui/ws/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698