| 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_SYSTEM_SCREEN_LAYOUT_OBSERVER_H_ | 5 #ifndef ASH_SYSTEM_SCREEN_LAYOUT_OBSERVER_H_ |
| 6 #define ASH_SYSTEM_SCREEN_LAYOUT_OBSERVER_H_ | 6 #define ASH_SYSTEM_SCREEN_LAYOUT_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 ScreenLayoutObserver(); | 24 ScreenLayoutObserver(); |
| 25 ~ScreenLayoutObserver() override; | 25 ~ScreenLayoutObserver() override; |
| 26 | 26 |
| 27 // Overridden from WmDisplayObserver: | 27 // Overridden from WmDisplayObserver: |
| 28 void OnDisplayConfigurationChanged() override; | 28 void OnDisplayConfigurationChanged() override; |
| 29 | 29 |
| 30 // Notifications are shown in production and are not shown in unit tests. | 30 // Notifications are shown in production and are not shown in unit tests. |
| 31 // Allow individual unit tests to show notifications. | 31 // Allow individual unit tests to show notifications. |
| 32 void set_show_notifications_for_testing(bool show) { | 32 void set_show_notifications_for_testing(bool show) { |
| 33 show_notifications_for_testing = show; | 33 show_notifications_for_testing_ = show; |
| 34 } | 34 } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 friend class ScreenLayoutObserverTest; | 37 friend class ScreenLayoutObserverTest; |
| 38 | 38 |
| 39 using DisplayInfoMap = std::map<int64_t, display::ManagedDisplayInfo>; | 39 using DisplayInfoMap = std::map<int64_t, display::ManagedDisplayInfo>; |
| 40 | 40 |
| 41 static const char kNotificationId[]; | 41 static const char kNotificationId[]; |
| 42 | 42 |
| 43 // Scans the current display info and updates |display_info_|. Sets the | 43 // Scans the current display info and updates |display_info_|. Sets the |
| (...skipping 26 matching lines...) Expand all Loading... |
| 70 EXTENDED_2, // 2 displays in extended mode. | 70 EXTENDED_2, // 2 displays in extended mode. |
| 71 EXTENDED_3_PLUS, // 3+ displays in extended mode. | 71 EXTENDED_3_PLUS, // 3+ displays in extended mode. |
| 72 MIRRORING, | 72 MIRRORING, |
| 73 UNIFIED, | 73 UNIFIED, |
| 74 DOCKED | 74 DOCKED |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 DisplayMode old_display_mode_ = DisplayMode::SINGLE; | 77 DisplayMode old_display_mode_ = DisplayMode::SINGLE; |
| 78 DisplayMode current_display_mode_ = DisplayMode::SINGLE; | 78 DisplayMode current_display_mode_ = DisplayMode::SINGLE; |
| 79 | 79 |
| 80 bool show_notifications_for_testing = true; | 80 bool show_notifications_for_testing_ = true; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(ScreenLayoutObserver); | 82 DISALLOW_COPY_AND_ASSIGN(ScreenLayoutObserver); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace ash | 85 } // namespace ash |
| 86 | 86 |
| 87 #endif // ASH_SYSTEM_SCREEN_LAYOUT_OBSERVER_H_ | 87 #endif // ASH_SYSTEM_SCREEN_LAYOUT_OBSERVER_H_ |
| OLD | NEW |