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

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

Issue 23726015: All together now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_cap
Patch Set: Created 7 years, 3 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 | « no previous file | ash/display/display_controller.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
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/display/display_layout.h" 12 #include "ash/display/display_layout.h"
13 #include "ash/display/display_manager.h" 13 #include "ash/display/display_manager.h"
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "ui/aura/root_window_observer.h" 20 #include "ui/aura/root_window_observer.h"
21 #include "ui/compositor/compositor_retriever_delegate.h"
21 #include "ui/gfx/display_observer.h" 22 #include "ui/gfx/display_observer.h"
22 #include "ui/gfx/point.h" 23 #include "ui/gfx/point.h"
23 24
24 namespace aura { 25 namespace aura {
25 class Display; 26 class Display;
26 class RootWindow; 27 class RootWindow;
27 } 28 }
28 29
29 namespace base { 30 namespace base {
30 class Value; 31 class Value;
(...skipping 11 matching lines...) Expand all
42 class DisplayManager; 43 class DisplayManager;
43 class FocusActivationStore; 44 class FocusActivationStore;
44 class MirrorWindowController; 45 class MirrorWindowController;
45 class RootWindowController; 46 class RootWindowController;
46 } 47 }
47 48
48 // DisplayController owns and maintains RootWindows for each attached 49 // DisplayController owns and maintains RootWindows for each attached
49 // display, keeping them in sync with display configuration changes. 50 // display, keeping them in sync with display configuration changes.
50 class ASH_EXPORT DisplayController : public gfx::DisplayObserver, 51 class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
51 public aura::RootWindowObserver, 52 public aura::RootWindowObserver,
52 public internal::DisplayManager::Delegate { 53 public internal::DisplayManager::Delegate,
54 public ui::CompositorRetrieverDelegate {
53 public: 55 public:
54 class ASH_EXPORT Observer { 56 class ASH_EXPORT Observer {
55 public: 57 public:
56 // Invoked when the display configuration change is requested, 58 // Invoked when the display configuration change is requested,
57 // but before the change is applied to aura/ash. 59 // but before the change is applied to aura/ash.
58 virtual void OnDisplayConfigurationChanging() {} 60 virtual void OnDisplayConfigurationChanging() {}
59 61
60 // Invoked when the all display configuration changes 62 // Invoked when the all display configuration changes
61 // have been applied. 63 // have been applied.
62 virtual void OnDisplayConfigurationChanged() {}; 64 virtual void OnDisplayConfigurationChanged() {};
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // RootWindowObserver overrides: 164 // RootWindowObserver overrides:
163 virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE; 165 virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
164 166
165 // aura::DisplayManager::Delegate overrides: 167 // aura::DisplayManager::Delegate overrides:
166 virtual void CreateOrUpdateMirrorWindow( 168 virtual void CreateOrUpdateMirrorWindow(
167 const internal::DisplayInfo& info) OVERRIDE; 169 const internal::DisplayInfo& info) OVERRIDE;
168 virtual void CloseMirrorWindow() OVERRIDE; 170 virtual void CloseMirrorWindow() OVERRIDE;
169 virtual void PreDisplayConfigurationChange() OVERRIDE; 171 virtual void PreDisplayConfigurationChange() OVERRIDE;
170 virtual void PostDisplayConfigurationChange() OVERRIDE; 172 virtual void PostDisplayConfigurationChange() OVERRIDE;
171 173
174 // ui::CompositorRetrieverDelegate overrides:
175 virtual ui::Compositor* GetCompositorForDisplay(
176 const gfx::Display& display) OVERRIDE;
177
172 private: 178 private:
173 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); 179 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated);
174 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); 180 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout);
175 friend class internal::DisplayManager; 181 friend class internal::DisplayManager;
176 friend class internal::MirrorWindowController; 182 friend class internal::MirrorWindowController;
177 183
178 // Creates a root window for |display| and stores it in the |root_windows_| 184 // Creates a root window for |display| and stores it in the |root_windows_|
179 // map. 185 // map.
180 aura::RootWindow* AddRootWindowForDisplay(const gfx::Display& display); 186 aura::RootWindow* AddRootWindowForDisplay(const gfx::Display& display);
181 187
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // restore the cursor location when display configuration 232 // restore the cursor location when display configuration
227 // changed. 233 // changed.
228 gfx::Point cursor_location_in_native_coords_for_restore_; 234 gfx::Point cursor_location_in_native_coords_for_restore_;
229 235
230 DISALLOW_COPY_AND_ASSIGN(DisplayController); 236 DISALLOW_COPY_AND_ASSIGN(DisplayController);
231 }; 237 };
232 238
233 } // namespace ash 239 } // namespace ash
234 240
235 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 241 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698