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

Side by Side Diff: ui/aura/mus/window_manager_delegate.h

Issue 2536943005: Adds couple of functions to WindowManagerDelegate: (Closed)
Patch Set: comment Created 4 years 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/test_wm/test_wm.cc ('k') | ui/aura/mus/window_tree_client.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 5 #ifndef UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const base::Callback<void(bool)>& callback) = 0; 53 const base::Callback<void(bool)>& callback) = 0;
54 virtual void RemoveAccelerator(uint32_t id) = 0; 54 virtual void RemoveAccelerator(uint32_t id) = 0;
55 virtual void AddActivationParent(Window* window) = 0; 55 virtual void AddActivationParent(Window* window) = 0;
56 virtual void RemoveActivationParent(Window* window) = 0; 56 virtual void RemoveActivationParent(Window* window) = 0;
57 virtual void ActivateNextWindow() = 0; 57 virtual void ActivateNextWindow() = 0;
58 virtual void SetUnderlaySurfaceOffsetAndExtendedHitArea( 58 virtual void SetUnderlaySurfaceOffsetAndExtendedHitArea(
59 Window* window, 59 Window* window,
60 const gfx::Vector2d& offset, 60 const gfx::Vector2d& offset,
61 const gfx::Insets& hit_area) = 0; 61 const gfx::Insets& hit_area) = 0;
62 62
63 // Requests the client embedded in |window| to close the window. Only
64 // applicable to top-level windows. If a client is not embedded in |window|,
65 // this does nothing.
66 virtual void RequestClose(Window* window) = 0;
67
63 protected: 68 protected:
64 virtual ~WindowManagerClient() {} 69 virtual ~WindowManagerClient() {}
65 }; 70 };
66 71
67 // Used by clients implementing a window manager. 72 // Used by clients implementing a window manager.
68 // TODO(sky): this should be called WindowManager, but that's rather confusing 73 // TODO(sky): this should be called WindowManager, but that's rather confusing
69 // currently. 74 // currently.
70 class AURA_EXPORT WindowManagerDelegate { 75 class AURA_EXPORT WindowManagerDelegate {
71 public: 76 public:
72 // Called once to give the delegate access to functions only exposed to 77 // Called once to give the delegate access to functions only exposed to
(...skipping 27 matching lines...) Expand all
100 virtual Window* OnWmCreateTopLevelWindow( 105 virtual Window* OnWmCreateTopLevelWindow(
101 ui::mojom::WindowType window_type, 106 ui::mojom::WindowType window_type,
102 std::map<std::string, std::vector<uint8_t>>* properties) = 0; 107 std::map<std::string, std::vector<uint8_t>>* properties) = 0;
103 108
104 // Called when a Mus client's jankiness changes. |windows| is the set of 109 // Called when a Mus client's jankiness changes. |windows| is the set of
105 // windows owned by the window manager in which the client is embedded. 110 // windows owned by the window manager in which the client is embedded.
106 virtual void OnWmClientJankinessChanged( 111 virtual void OnWmClientJankinessChanged(
107 const std::set<Window*>& client_windows, 112 const std::set<Window*>& client_windows,
108 bool janky) = 0; 113 bool janky) = 0;
109 114
115 // When a new display is added OnWmWillCreateDisplay() is called, and then
116 // OnWmNewDisplay(). OnWmWillCreateDisplay() is intended to add the display
117 // to the set of displays (see Screen).
118 virtual void OnWmWillCreateDisplay(const display::Display& display) = 0;
119
120 // Called when a WindowTreeHostMus is created for a new display
110 // Called when a display is added. |window_tree_host| is the WindowTreeHost 121 // Called when a display is added. |window_tree_host| is the WindowTreeHost
111 // for the new display. 122 // for the new display.
112 virtual void OnWmNewDisplay( 123 virtual void OnWmNewDisplay(
113 std::unique_ptr<WindowTreeHostMus> window_tree_host, 124 std::unique_ptr<WindowTreeHostMus> window_tree_host,
114 const display::Display& display) = 0; 125 const display::Display& display) = 0;
115 126
116 // Called when a display is removed. |window_tree_host| is the WindowTreeHost 127 // Called when a display is removed. |window_tree_host| is the WindowTreeHost
117 // for the display. 128 // for the display.
118 virtual void OnWmDisplayRemoved(WindowTreeHostMus* window_tree_host) = 0; 129 virtual void OnWmDisplayRemoved(WindowTreeHostMus* window_tree_host) = 0;
119 130
120 // Called when a display is modified. 131 // Called when a display is modified.
121 virtual void OnWmDisplayModified(const display::Display& display) = 0; 132 virtual void OnWmDisplayModified(const display::Display& display) = 0;
122 133
123 virtual ui::mojom::EventResult OnAccelerator(uint32_t id, 134 virtual ui::mojom::EventResult OnAccelerator(uint32_t id,
124 const ui::Event& event); 135 const ui::Event& event);
125 136
126 virtual void OnWmPerformMoveLoop( 137 virtual void OnWmPerformMoveLoop(
127 Window* window, 138 Window* window,
128 ui::mojom::MoveLoopSource source, 139 ui::mojom::MoveLoopSource source,
129 const gfx::Point& cursor_location, 140 const gfx::Point& cursor_location,
130 const base::Callback<void(bool)>& on_done) = 0; 141 const base::Callback<void(bool)>& on_done) = 0;
131 142
132 virtual void OnWmCancelMoveLoop(Window* window) = 0; 143 virtual void OnWmCancelMoveLoop(Window* window) = 0;
133 144
145 // Called when then client changes the client area of a window.
146 virtual void OnWmSetClientArea(
147 Window* window,
148 const gfx::Insets& insets,
149 const std::vector<gfx::Rect>& additional_client_areas) = 0;
150
134 protected: 151 protected:
135 virtual ~WindowManagerDelegate() {} 152 virtual ~WindowManagerDelegate() {}
136 }; 153 };
137 154
138 } // namespace ui 155 } // namespace ui
139 156
140 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 157 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « services/ui/test_wm/test_wm.cc ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698