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

Side by Side Diff: ash/wm_window.h

Issue 2908793002: [mus+ash] Removes WmWindow from ash/wm/overview and ash/wm/workspace (Closed)
Patch Set: Created 3 years, 6 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 | « ash/wm/workspace_controller.cc ('k') | ash/wm_window.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 #ifndef ASH_WM_WINDOW_H_ 5 #ifndef ASH_WM_WINDOW_H_
6 #define ASH_WM_WINDOW_H_ 6 #define ASH_WM_WINDOW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 namespace gfx { 26 namespace gfx {
27 class Point; 27 class Point;
28 class Rect; 28 class Rect;
29 class Size; 29 class Size;
30 class Transform; 30 class Transform;
31 } 31 }
32 32
33 namespace ui { 33 namespace ui {
34 class EventHandler;
35 class Layer; 34 class Layer;
36 } 35 }
37 36
38 namespace ash { 37 namespace ash {
39 38
40 class ImmersiveFullscreenController; 39 class ImmersiveFullscreenController;
41 class RootWindowController; 40 class RootWindowController;
42 class WmTransientWindowObserver; 41 class WmTransientWindowObserver;
43 enum class WmWindowProperty; 42 enum class WmWindowProperty;
44 43
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 void StackChildAtBottom(WmWindow* child); 241 void StackChildAtBottom(WmWindow* child);
243 void StackChildAbove(WmWindow* child, WmWindow* target); 242 void StackChildAbove(WmWindow* child, WmWindow* target);
244 void StackChildBelow(WmWindow* child, WmWindow* target); 243 void StackChildBelow(WmWindow* child, WmWindow* target);
245 244
246 void SetAlwaysOnTop(bool value); 245 void SetAlwaysOnTop(bool value);
247 bool IsAlwaysOnTop() const; 246 bool IsAlwaysOnTop() const;
248 247
249 void Hide(); 248 void Hide();
250 void Show(); 249 void Show();
251 250
252 // Requests the window to close and destroy itself. This is intended to
253 // forward to an associated widget.
254 void CloseWidget();
255
256 void SetFocused(); 251 void SetFocused();
257 bool IsFocused() const; 252 bool IsFocused() const;
258 253
259 bool IsActive() const; 254 bool IsActive() const;
260 void Activate(); 255 void Activate();
261 void Deactivate(); 256 void Deactivate();
262 257
263 void SetFullscreen(bool fullscreen); 258 void SetFullscreen(bool fullscreen);
264 259
265 void Maximize(); 260 void Maximize();
(...skipping 17 matching lines...) Expand all
283 // snaps the layer associated with this window to the layer associated with 278 // snaps the layer associated with this window to the layer associated with
284 // the ancestor. 279 // the ancestor.
285 void SnapToPixelBoundaryIfNecessary(); 280 void SnapToPixelBoundaryIfNecessary();
286 281
287 // Makes the hit region for children slightly larger for easier resizing. 282 // Makes the hit region for children slightly larger for easier resizing.
288 void SetChildrenUseExtendedHitRegion(); 283 void SetChildrenUseExtendedHitRegion();
289 284
290 void AddTransientWindowObserver(WmTransientWindowObserver* observer); 285 void AddTransientWindowObserver(WmTransientWindowObserver* observer);
291 void RemoveTransientWindowObserver(WmTransientWindowObserver* observer); 286 void RemoveTransientWindowObserver(WmTransientWindowObserver* observer);
292 287
293 // Adds or removes a handler to receive events targeted at this window, before
294 // this window handles the events itself; the handler does not recieve events
295 // from embedded windows. This only supports windows with internal widgets;
296 // see ash::GetInternalWidgetForWindow(). Ownership of the handler is not
297 // transferred.
298 //
299 // Also note that the target of these events is always an aura::Window.
300 void AddLimitedPreTargetHandler(ui::EventHandler* handler);
301 void RemoveLimitedPreTargetHandler(ui::EventHandler* handler);
302
303 private: 288 private:
304 explicit WmWindow(aura::Window* window); 289 explicit WmWindow(aura::Window* window);
305 290
306 // ::wm::TransientWindowObserver overrides: 291 // ::wm::TransientWindowObserver overrides:
307 void OnTransientChildAdded(aura::Window* window, 292 void OnTransientChildAdded(aura::Window* window,
308 aura::Window* transient) override; 293 aura::Window* transient) override;
309 void OnTransientChildRemoved(aura::Window* window, 294 void OnTransientChildRemoved(aura::Window* window,
310 aura::Window* transient) override; 295 aura::Window* transient) override;
311 296
312 aura::Window* window_; 297 aura::Window* window_;
313 298
314 bool added_transient_observer_ = false; 299 bool added_transient_observer_ = false;
315 base::ObserverList<WmTransientWindowObserver> transient_observers_; 300 base::ObserverList<WmTransientWindowObserver> transient_observers_;
316 301
317 // If true child windows should get a slightly larger hit region to make 302 // If true child windows should get a slightly larger hit region to make
318 // resizing easier. 303 // resizing easier.
319 bool children_use_extended_hit_region_ = false; 304 bool children_use_extended_hit_region_ = false;
320 305
321 DISALLOW_COPY_AND_ASSIGN(WmWindow); 306 DISALLOW_COPY_AND_ASSIGN(WmWindow);
322 }; 307 };
323 308
324 } // namespace ash 309 } // namespace ash
325 310
326 #endif // ASH_WM_WINDOW_H_ 311 #endif // ASH_WM_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller.cc ('k') | ash/wm_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698