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

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

Issue 686593002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 19 matching lines...) Expand all
30 // Windows which cannot be maximized / resized are centered with a layer placed 30 // Windows which cannot be maximized / resized are centered with a layer placed
31 // behind the window so that no other windows are visible and/or obscured. 31 // behind the window so that no other windows are visible and/or obscured.
32 // With the destruction of the manager all windows will be restored to their 32 // With the destruction of the manager all windows will be restored to their
33 // original state. 33 // original state.
34 class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver, 34 class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
35 public gfx::DisplayObserver, 35 public gfx::DisplayObserver,
36 public ShellObserver, 36 public ShellObserver,
37 public ui::EventHandler { 37 public ui::EventHandler {
38 public: 38 public:
39 // This should only be deleted by the creator (ash::Shell). 39 // This should only be deleted by the creator (ash::Shell).
40 virtual ~MaximizeModeWindowManager(); 40 ~MaximizeModeWindowManager() override;
41 41
42 // Returns the number of maximized & tracked windows by this manager. 42 // Returns the number of maximized & tracked windows by this manager.
43 int GetNumberOfManagedWindows(); 43 int GetNumberOfManagedWindows();
44 44
45 // Adds a window which needs to be maximized. This is used by other window 45 // Adds a window which needs to be maximized. This is used by other window
46 // managers for windows which needs to get tracked due to (upcoming) state 46 // managers for windows which needs to get tracked due to (upcoming) state
47 // changes. 47 // changes.
48 // The call gets ignored if the window was already or should not be handled. 48 // The call gets ignored if the window was already or should not be handled.
49 void AddWindow(aura::Window* window); 49 void AddWindow(aura::Window* window);
50 50
51 // Called from a window state object when it gets destroyed. 51 // Called from a window state object when it gets destroyed.
52 void WindowStateDestroyed(aura::Window* window); 52 void WindowStateDestroyed(aura::Window* window);
53 53
54 // ShellObserver overrides: 54 // ShellObserver overrides:
55 virtual void OnOverviewModeStarting() override; 55 void OnOverviewModeStarting() override;
56 virtual void OnOverviewModeEnding() override; 56 void OnOverviewModeEnding() override;
57 57
58 // Overridden from WindowObserver: 58 // Overridden from WindowObserver:
59 virtual void OnWindowDestroying(aura::Window* window) override; 59 void OnWindowDestroying(aura::Window* window) override;
60 virtual void OnWindowAdded(aura::Window* window) override; 60 void OnWindowAdded(aura::Window* window) override;
61 virtual void OnWindowBoundsChanged(aura::Window* window, 61 void OnWindowBoundsChanged(aura::Window* window,
62 const gfx::Rect& old_bounds, 62 const gfx::Rect& old_bounds,
63 const gfx::Rect& new_bounds) override; 63 const gfx::Rect& new_bounds) override;
64 64
65 // gfx::DisplayObserver overrides: 65 // gfx::DisplayObserver overrides:
66 virtual void OnDisplayAdded(const gfx::Display& display) override; 66 void OnDisplayAdded(const gfx::Display& display) override;
67 virtual void OnDisplayRemoved(const gfx::Display& display) override; 67 void OnDisplayRemoved(const gfx::Display& display) override;
68 virtual void OnDisplayMetricsChanged(const gfx::Display& display, 68 void OnDisplayMetricsChanged(const gfx::Display& display,
69 uint32_t metrics) override; 69 uint32_t metrics) override;
70 70
71 // ui::EventHandler override: 71 // ui::EventHandler override:
72 virtual void OnTouchEvent(ui::TouchEvent* event) override; 72 void OnTouchEvent(ui::TouchEvent* event) override;
73 73
74 protected: 74 protected:
75 friend class MaximizeModeController; 75 friend class MaximizeModeController;
76 76
77 // The object should only be created by the ash::Shell. 77 // The object should only be created by the ash::Shell.
78 MaximizeModeWindowManager(); 78 MaximizeModeWindowManager();
79 79
80 private: 80 private:
81 typedef std::map<aura::Window*, MaximizeModeWindowState*> WindowToState; 81 typedef std::map<aura::Window*, MaximizeModeWindowState*> WindowToState;
82 82
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 // True if all backdrops are hidden. 128 // True if all backdrops are hidden.
129 bool backdrops_hidden_; 129 bool backdrops_hidden_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager); 131 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager);
132 }; 132 };
133 133
134 } // namespace ash 134 } // namespace ash
135 135
136 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 136 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698