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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_manager.h

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/shell_observer.h" 14 #include "ash/shell_observer.h"
15 #include "ash/wm/common/window_state.h" 15 #include "ash/wm/common/window_state.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "ui/aura/window_observer.h" 18 #include "ui/aura/window_observer.h"
19 #include "ui/display/display_observer.h"
19 #include "ui/events/event_handler.h" 20 #include "ui/events/event_handler.h"
20 #include "ui/gfx/display_observer.h"
21 21
22 namespace ui { 22 namespace ui {
23 class TouchEvent; 23 class TouchEvent;
24 } 24 }
25 25
26 namespace ash { 26 namespace ash {
27 class MaximizeModeController; 27 class MaximizeModeController;
28 class MaximizeModeWindowState; 28 class MaximizeModeWindowState;
29 29
30 // A window manager which - when created - will force all windows into maximized 30 // A window manager which - when created - will force all windows into maximized
31 // mode. Exception are panels and windows which cannot be maximized. 31 // mode. Exception are panels and windows which cannot be maximized.
32 // Windows which cannot be maximized / resized are centered with a layer placed 32 // Windows which cannot be maximized / resized are centered with a layer placed
33 // behind the window so that no other windows are visible and/or obscured. 33 // behind the window so that no other windows are visible and/or obscured.
34 // With the destruction of the manager all windows will be restored to their 34 // With the destruction of the manager all windows will be restored to their
35 // original state. 35 // original state.
36 class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver, 36 class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
37 public gfx::DisplayObserver, 37 public display::DisplayObserver,
38 public ShellObserver, 38 public ShellObserver,
39 public ui::EventHandler { 39 public ui::EventHandler {
40 public: 40 public:
41 // This should only be deleted by the creator (ash::Shell). 41 // This should only be deleted by the creator (ash::Shell).
42 ~MaximizeModeWindowManager() override; 42 ~MaximizeModeWindowManager() override;
43 43
44 // Returns the number of maximized & tracked windows by this manager. 44 // Returns the number of maximized & tracked windows by this manager.
45 int GetNumberOfManagedWindows(); 45 int GetNumberOfManagedWindows();
46 46
47 // Adds a window which needs to be maximized. This is used by other window 47 // Adds a window which needs to be maximized. This is used by other window
(...skipping 12 matching lines...) Expand all
60 // Overridden from WindowObserver: 60 // Overridden from WindowObserver:
61 void OnWindowDestroying(aura::Window* window) override; 61 void OnWindowDestroying(aura::Window* window) override;
62 void OnWindowAdded(aura::Window* window) override; 62 void OnWindowAdded(aura::Window* window) override;
63 void OnWindowPropertyChanged(aura::Window* window, 63 void OnWindowPropertyChanged(aura::Window* window,
64 const void* key, 64 const void* key,
65 intptr_t old) override; 65 intptr_t old) override;
66 void OnWindowBoundsChanged(aura::Window* window, 66 void OnWindowBoundsChanged(aura::Window* window,
67 const gfx::Rect& old_bounds, 67 const gfx::Rect& old_bounds,
68 const gfx::Rect& new_bounds) override; 68 const gfx::Rect& new_bounds) override;
69 69
70 // gfx::DisplayObserver overrides: 70 // display::DisplayObserver overrides:
71 void OnDisplayAdded(const gfx::Display& display) override; 71 void OnDisplayAdded(const display::Display& display) override;
72 void OnDisplayRemoved(const gfx::Display& display) override; 72 void OnDisplayRemoved(const display::Display& display) override;
73 void OnDisplayMetricsChanged(const gfx::Display& display, 73 void OnDisplayMetricsChanged(const display::Display& display,
74 uint32_t metrics) override; 74 uint32_t metrics) override;
75 75
76 // ui::EventHandler override: 76 // ui::EventHandler override:
77 void OnTouchEvent(ui::TouchEvent* event) override; 77 void OnTouchEvent(ui::TouchEvent* event) override;
78 78
79 protected: 79 protected:
80 friend class MaximizeModeController; 80 friend class MaximizeModeController;
81 81
82 // The object should only be created by the ash::Shell. 82 // The object should only be created by the ash::Shell.
83 MaximizeModeWindowManager(); 83 MaximizeModeWindowManager();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 // True if all backdrops are hidden. 133 // True if all backdrops are hidden.
134 bool backdrops_hidden_; 134 bool backdrops_hidden_;
135 135
136 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager); 136 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager);
137 }; 137 };
138 138
139 } // namespace ash 139 } // namespace ash
140 140
141 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 141 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698