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

Side by Side Diff: services/ui/demo/mus_demo_external.h

Issue 2700493005: Mus Demo: Refactor code to prepare multiple windows in external mode (Closed)
Patch Set: Rename MusExternal::tree_client_ & describes the helper functions for WindowTreeData. 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
« no previous file with comments | « services/ui/demo/mus_demo.cc ('k') | services/ui/demo/mus_demo_external.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 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 #ifndef SERVICES_UI_DEMO_MUS_DEMO_EXTERNAL_H_ 5 #ifndef SERVICES_UI_DEMO_MUS_DEMO_EXTERNAL_H_
6 #define SERVICES_UI_DEMO_MUS_DEMO_EXTERNAL_H_ 6 #define SERVICES_UI_DEMO_MUS_DEMO_EXTERNAL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "services/ui/demo/mus_demo.h" 11 #include "services/ui/demo/mus_demo.h"
12 #include "services/ui/public/interfaces/window_tree_host.mojom.h" 12 #include "services/ui/public/interfaces/window_tree_host.mojom.h"
13 13
14 namespace ui { 14 namespace ui {
15 namespace demo { 15 namespace demo {
16 16
17 // MusDemoExternal demonstrates Mus operating in "external" mode: A new platform 17 // MusDemoExternal demonstrates Mus operating in "external" mode: A new platform
18 // window (and hence acceleratedWidget) is created for each aura window. 18 // window (and hence acceleratedWidget) is created for each aura window.
19 class MusDemoExternal : public MusDemo { 19 class MusDemoExternal : public MusDemo {
20 public: 20 public:
21 MusDemoExternal(); 21 MusDemoExternal();
22 ~MusDemoExternal() final; 22 ~MusDemoExternal() final;
23 23
24 private: 24 private:
25 void OpenNewWindow();
26
25 // ui::demo::MusDemo: 27 // ui::demo::MusDemo:
26 void OnStartImpl(std::unique_ptr<aura::WindowTreeClient>* window_tree_client, 28 void OnStartImpl() final;
27 std::unique_ptr<WindowTreeData>* window_tree_data) final; 29 std::unique_ptr<aura::WindowTreeClient> CreateWindowTreeClient() final;
28 30
29 // aura::WindowTreeClientDelegate: 31 // aura::WindowTreeClientDelegate:
30 void OnEmbed(std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) final; 32 void OnEmbed(std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) final;
31 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) final; 33 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) final;
32 34
33 mojom::WindowTreeHostFactoryPtr window_tree_host_factory_; 35 mojom::WindowTreeHostFactoryPtr window_tree_host_factory_;
36 mojom::WindowTreeClientPtr window_tree_client_mojo_;
37 size_t initialized_windows_count_ = 0;
34 38
35 DISALLOW_COPY_AND_ASSIGN(MusDemoExternal); 39 DISALLOW_COPY_AND_ASSIGN(MusDemoExternal);
36 }; 40 };
37 41
38 } // namespace demo 42 } // namespace demo
39 } // namespace ui 43 } // namespace ui
40 44
41 #endif // SERVICES_UI_DEMO_MUS_DEMO_EXTERNAL_H_ 45 #endif // SERVICES_UI_DEMO_MUS_DEMO_EXTERNAL_H_
OLDNEW
« no previous file with comments | « services/ui/demo/mus_demo.cc ('k') | services/ui/demo/mus_demo_external.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698