OLD | NEW |
---|---|
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_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ |
6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... | |
36 | 36 |
37 namespace gfx { | 37 namespace gfx { |
38 class Insets; | 38 class Insets; |
39 class Rect; | 39 class Rect; |
40 } | 40 } |
41 | 41 |
42 namespace ash { | 42 namespace ash { |
43 using DisplayInfoList = std::vector<display::ManagedDisplayInfo>; | 43 using DisplayInfoList = std::vector<display::ManagedDisplayInfo>; |
44 | 44 |
45 namespace test { | 45 namespace test { |
46 class AshTestBase; | |
47 class DisplayManagerTestApi; | 46 class DisplayManagerTestApi; |
48 } | 47 } |
49 | 48 |
50 // DisplayManager maintains the current display configurations, | 49 // DisplayManager maintains the current display configurations, |
51 // and notifies observers when configuration changes. | 50 // and notifies observers when configuration changes. |
52 // | 51 // |
53 // TODO(oshima): Make this non internal. | 52 // TODO(oshima): Make this non internal. |
54 class ASH_EXPORT DisplayManager | 53 class ASH_EXPORT DisplayManager |
55 #if defined(OS_CHROMEOS) | 54 #if defined(OS_CHROMEOS) |
56 : public ui::DisplayConfigurator::SoftwareMirroringController | 55 : public ui::DisplayConfigurator::SoftwareMirroringController |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 | 340 |
342 // Notifies observers of display configuration changes. | 341 // Notifies observers of display configuration changes. |
343 void NotifyMetricsChanged(const display::Display& display, uint32_t metrics); | 342 void NotifyMetricsChanged(const display::Display& display, uint32_t metrics); |
344 void NotifyDisplayAdded(const display::Display& display); | 343 void NotifyDisplayAdded(const display::Display& display); |
345 void NotifyDisplayRemoved(const display::Display& display); | 344 void NotifyDisplayRemoved(const display::Display& display); |
346 | 345 |
347 // Delegated from the Screen implementation. | 346 // Delegated from the Screen implementation. |
348 void AddObserver(display::DisplayObserver* observer); | 347 void AddObserver(display::DisplayObserver* observer); |
349 void RemoveObserver(display::DisplayObserver* observer); | 348 void RemoveObserver(display::DisplayObserver* observer); |
350 | 349 |
350 // Returns a display::Display object for a secondary display if it exists | |
351 // or returns invalid display if there is no secondary display. | |
352 const display::Display& GetSecondaryDisplay() const; | |
oshima
2016/10/04 00:47:16
just fyi: "swap display" is a legacy feature we ad
rjkroege
2016/10/05 00:21:45
I added a TODO.
| |
353 | |
351 private: | 354 private: |
352 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint); | |
353 FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, TestNativeDisplaysChanged); | |
354 FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, | |
355 NativeDisplaysChangedAfterPrimaryChange); | |
356 FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, AutomaticOverscanInsets); | |
357 FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, Rotate); | |
358 friend class DisplayManagerTest; | |
359 friend class test::AshTestBase; | |
360 friend class test::DisplayManagerTestApi; | 355 friend class test::DisplayManagerTestApi; |
361 | 356 |
362 bool software_mirroring_enabled() const { | 357 bool software_mirroring_enabled() const { |
363 return multi_display_mode_ == MIRRORING; | 358 return multi_display_mode_ == MIRRORING; |
364 }; | 359 }; |
365 | 360 |
366 void set_change_display_upon_host_resize(bool value) { | 361 void set_change_display_upon_host_resize(bool value) { |
367 change_display_upon_host_resize_ = value; | 362 change_display_upon_host_resize_ = value; |
368 } | 363 } |
369 | 364 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 base::ObserverList<display::DisplayObserver> observers_; | 472 base::ObserverList<display::DisplayObserver> observers_; |
478 | 473 |
479 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; | 474 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; |
480 | 475 |
481 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 476 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
482 }; | 477 }; |
483 | 478 |
484 } // namespace ash | 479 } // namespace ash |
485 | 480 |
486 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 481 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
OLD | NEW |