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

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

Issue 2693923004: Mus Demo: Extract code specific to internal mode into a separate class (Closed)
Patch Set: Address review comments and more refactoring 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_DEMO_MUS_DEMO_INTERNAL_H_
6 #define SERVICES_UI_DEMO_MUS_DEMO_INTERNAL_H_
7
8 #include <map>
9 #include <memory>
10 #include <set>
11 #include <string>
12 #include <vector>
13
14 #include "services/ui/demo/mus_demo.h"
15 #include "ui/aura/mus/window_manager_delegate.h"
16
17 namespace ui {
18 namespace demo {
19
20 class MusDemoInternal : public MusDemo, public aura::WindowManagerDelegate {
21 public:
22 MusDemoInternal();
23 ~MusDemoInternal() final;
24
25 private:
26 void OnStartImpl(std::unique_ptr<aura::WindowTreeClient>& window_tree_client,
27 std::unique_ptr<WindowTreeData>& window_tree_data) final;
28
29 // aura::WindowManagerDelegate:
30 void SetWindowManagerClient(aura::WindowManagerClient* client) final;
31 bool OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) final;
32 bool OnWmSetProperty(aura::Window* window,
33 const std::string& name,
34 std::unique_ptr<std::vector<uint8_t>>* new_data) final;
35 void OnWmSetCanFocus(aura::Window* window, bool can_focus) final;
36 aura::Window* OnWmCreateTopLevelWindow(
37 ui::mojom::WindowType window_type,
38 std::map<std::string, std::vector<uint8_t>>* properties) final;
39 void OnWmClientJankinessChanged(const std::set<aura::Window*>& client_windows,
40 bool janky) final;
41 void OnWmWillCreateDisplay(const display::Display& display) final;
42 void OnWmNewDisplay(std::unique_ptr<aura::WindowTreeHostMus> window_tree_host,
43 const display::Display& display) final;
44 void OnWmDisplayRemoved(aura::WindowTreeHostMus* window_tree_host) final;
45 void OnWmDisplayModified(const display::Display& display) final;
46 ui::mojom::EventResult OnAccelerator(uint32_t id,
47 const ui::Event& event) final;
48 void OnWmPerformMoveLoop(aura::Window* window,
49 ui::mojom::MoveLoopSource source,
50 const gfx::Point& cursor_location,
51 const base::Callback<void(bool)>& on_done) final;
52 void OnWmCancelMoveLoop(aura::Window* window) final;
53 void OnWmSetClientArea(
54 aura::Window* window,
55 const gfx::Insets& insets,
56 const std::vector<gfx::Rect>& additional_client_areas) final;
57 bool IsWindowActive(aura::Window* window) final;
58 void OnWmDeactivateWindow(aura::Window* window) final;
59
60 DISALLOW_COPY_AND_ASSIGN(MusDemoInternal);
61 };
62
63 } // namespace demo
64 } // namespace aura
65
66 #endif // SERVICES_UI_DEMO_MUS_DEMO_INTERNAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698