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

Side by Side Diff: ash/display/display_controller.h

Issue 685543003: 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
« no previous file with comments | « ash/display/cursor_window_controller.cc ('k') | ash/display/display_controller_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DISPLAY_DISPLAY_CONTROLLER_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_
6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // Invoked when the all display configuration changes 66 // Invoked when the all display configuration changes
67 // have been applied. 67 // have been applied.
68 virtual void OnDisplayConfigurationChanged() {}; 68 virtual void OnDisplayConfigurationChanged() {};
69 69
70 protected: 70 protected:
71 virtual ~Observer() {} 71 virtual ~Observer() {}
72 }; 72 };
73 73
74 DisplayController(); 74 DisplayController();
75 virtual ~DisplayController(); 75 ~DisplayController() override;
76 76
77 void Start(); 77 void Start();
78 void Shutdown(); 78 void Shutdown();
79 79
80 // Returns primary display's ID. 80 // Returns primary display's ID.
81 // TODO(oshima): Move this out from DisplayController; 81 // TODO(oshima): Move this out from DisplayController;
82 static int64 GetPrimaryDisplayId(); 82 static int64 GetPrimaryDisplayId();
83 83
84 CursorWindowController* cursor_window_controller() { 84 CursorWindowController* cursor_window_controller() {
85 return cursor_window_controller_.get(); 85 return cursor_window_controller_.get();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip); 137 void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip);
138 138
139 // Checks if the mouse pointer is on one of displays, and moves to 139 // Checks if the mouse pointer is on one of displays, and moves to
140 // the center of the nearest display if it's outside of all displays. 140 // the center of the nearest display if it's outside of all displays.
141 void EnsurePointerInDisplays(); 141 void EnsurePointerInDisplays();
142 142
143 // Sets the work area's |insets| to the display assigned to |window|. 143 // Sets the work area's |insets| to the display assigned to |window|.
144 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window, 144 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
145 const gfx::Insets& insets); 145 const gfx::Insets& insets);
146 // gfx::DisplayObserver overrides: 146 // gfx::DisplayObserver overrides:
147 virtual void OnDisplayAdded(const gfx::Display& display) override; 147 void OnDisplayAdded(const gfx::Display& display) override;
148 virtual void OnDisplayRemoved(const gfx::Display& display) override; 148 void OnDisplayRemoved(const gfx::Display& display) override;
149 virtual void OnDisplayMetricsChanged(const gfx::Display& display, 149 void OnDisplayMetricsChanged(const gfx::Display& display,
150 uint32_t metrics) override; 150 uint32_t metrics) override;
151 151
152 // aura::WindowTreeHostObserver overrides: 152 // aura::WindowTreeHostObserver overrides:
153 virtual void OnHostResized(const aura::WindowTreeHost* host) override; 153 void OnHostResized(const aura::WindowTreeHost* host) override;
154 154
155 // aura::DisplayManager::Delegate overrides: 155 // aura::DisplayManager::Delegate overrides:
156 virtual void CreateOrUpdateNonDesktopDisplay(const DisplayInfo& info) 156 void CreateOrUpdateNonDesktopDisplay(const DisplayInfo& info) override;
157 override; 157 void CloseNonDesktopDisplay() override;
158 virtual void CloseNonDesktopDisplay() override; 158 void PreDisplayConfigurationChange(bool clear_focus) override;
159 virtual void PreDisplayConfigurationChange(bool clear_focus) override; 159 void PostDisplayConfigurationChange() override;
160 virtual void PostDisplayConfigurationChange() override;
161 160
162 private: 161 private:
163 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); 162 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated);
164 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); 163 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout);
165 friend class DisplayManager; 164 friend class DisplayManager;
166 friend class MirrorWindowController; 165 friend class MirrorWindowController;
167 166
168 // Creates a WindowTreeHost for |display| and stores it in the 167 // Creates a WindowTreeHost for |display| and stores it in the
169 // |window_tree_hosts_| map. 168 // |window_tree_hosts_| map.
170 AshWindowTreeHost* AddWindowTreeHostForDisplay( 169 AshWindowTreeHost* AddWindowTreeHostForDisplay(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 gfx::Point cursor_location_in_native_coords_for_restore_; 217 gfx::Point cursor_location_in_native_coords_for_restore_;
219 218
220 base::WeakPtrFactory<DisplayController> weak_ptr_factory_; 219 base::WeakPtrFactory<DisplayController> weak_ptr_factory_;
221 220
222 DISALLOW_COPY_AND_ASSIGN(DisplayController); 221 DISALLOW_COPY_AND_ASSIGN(DisplayController);
223 }; 222 };
224 223
225 } // namespace ash 224 } // namespace ash
226 225
227 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 226 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/display/cursor_window_controller.cc ('k') | ash/display/display_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698