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

Side by Side Diff: services/ui/demo/mus_demo_internal.cc

Issue 2622103004: Mus Demo: Demonstrate external window mode (Closed)
Patch Set: Address kylechar's feedback Created 3 years, 10 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "services/ui/demo/mus_demo_internal.h" 5 #include "services/ui/demo/mus_demo_internal.h"
6 6
7 #include "services/service_manager/public/cpp/service_context.h" 7 #include "services/service_manager/public/cpp/service_context.h"
8 #include "services/ui/demo/window_tree_data.h" 8 #include "services/ui/demo/window_tree_data.h"
9 #include "ui/aura/mus/window_tree_client.h" 9 #include "ui/aura/mus/window_tree_client.h"
10 #include "ui/aura/mus/window_tree_host_mus.h" 10 #include "ui/aura/mus/window_tree_host_mus.h"
11 11
12 namespace ui { 12 namespace ui {
13 namespace demo { 13 namespace demo {
14 14
15 namespace { 15 namespace {
16 16
17 // Size of square in pixels to draw. 17 // Size of square in pixels to draw.
18 const int kSquareSize = 300; 18 const int kSquareSize = 300;
19 } 19 }
20 20
21 MusDemoInternal::MusDemoInternal() {} 21 MusDemoInternal::MusDemoInternal() {}
22 22
23 MusDemoInternal::~MusDemoInternal() {} 23 MusDemoInternal::~MusDemoInternal() {}
24 24
25 void MusDemoInternal::OnStartImpl( 25 void MusDemoInternal::OnStartImpl(
26 std::unique_ptr<aura::WindowTreeClient>& window_tree_client, 26 std::unique_ptr<aura::WindowTreeClient>* window_tree_client,
27 std::unique_ptr<WindowTreeData>& window_tree_data) { 27 std::unique_ptr<WindowTreeData>* window_tree_data) {
28 window_tree_client = base::MakeUnique<aura::WindowTreeClient>( 28 window_tree_client->reset(
kylechar 2017/02/21 18:51:08 *window_tree_client = base::MakeUnique
fwang 2017/02/21 19:02:21 Done.
29 context()->connector(), this, this); 29 new aura::WindowTreeClient(context()->connector(), this, this));
30 window_tree_client->ConnectAsWindowManager(); 30 window_tree_client->get()->ConnectAsWindowManager();
31 window_tree_data = base::MakeUnique<WindowTreeData>(kSquareSize); 31 window_tree_data->reset(new WindowTreeData(kSquareSize));
32 } 32 }
33 33
34 void MusDemoInternal::SetWindowManagerClient( 34 void MusDemoInternal::SetWindowManagerClient(
35 aura::WindowManagerClient* client) {} 35 aura::WindowManagerClient* client) {}
36 36
37 bool MusDemoInternal::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) { 37 bool MusDemoInternal::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) {
38 return true; 38 return true;
39 } 39 }
40 40
41 bool MusDemoInternal::OnWmSetProperty( 41 bool MusDemoInternal::OnWmSetProperty(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const std::vector<gfx::Rect>& additional_client_areas) {} 98 const std::vector<gfx::Rect>& additional_client_areas) {}
99 99
100 bool MusDemoInternal::IsWindowActive(aura::Window* window) { 100 bool MusDemoInternal::IsWindowActive(aura::Window* window) {
101 return false; 101 return false;
102 } 102 }
103 103
104 void MusDemoInternal::OnWmDeactivateWindow(aura::Window* window) {} 104 void MusDemoInternal::OnWmDeactivateWindow(aura::Window* window) {}
105 105
106 } // namespace demo 106 } // namespace demo
107 } // namespace ui 107 } // namespace ui
OLDNEW
« services/ui/demo/mus_demo_external.cc ('K') | « services/ui/demo/mus_demo_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698