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

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

Issue 2355063002: Separate ash::test::DisplayManagerTestApi from ash (Closed)
Patch Set: review comment Created 4 years, 2 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 | « ash/display/display_configuration_controller.cc ('k') | ash/display/display_manager.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_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
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
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 // TODO(rjkroege): Display swapping is an obsolete feature pre-dating
353 // multi-display support so remove it.
354 const display::Display& GetSecondaryDisplay() const;
355
351 private: 356 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; 357 friend class test::DisplayManagerTestApi;
361 358
362 bool software_mirroring_enabled() const { 359 bool software_mirroring_enabled() const {
363 return multi_display_mode_ == MIRRORING; 360 return multi_display_mode_ == MIRRORING;
364 }; 361 };
365 362
366 void set_change_display_upon_host_resize(bool value) { 363 void set_change_display_upon_host_resize(bool value) {
367 change_display_upon_host_resize_ = value; 364 change_display_upon_host_resize_ = value;
368 } 365 }
369 366
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 base::ObserverList<display::DisplayObserver> observers_; 474 base::ObserverList<display::DisplayObserver> observers_;
478 475
479 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; 476 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_;
480 477
481 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 478 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
482 }; 479 };
483 480
484 } // namespace ash 481 } // namespace ash
485 482
486 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ 483 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/display/display_configuration_controller.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698