| 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_CHROMEOS_TRAY_DISPLAY_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ | 6 #define ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 13 #include "ash/common/display/display_info.h" | 13 #include "ash/common/display/display_info.h" |
| 14 #include "ash/common/system/tray/system_tray_item.h" | 14 #include "ash/common/system/tray/system_tray_item.h" |
| 15 #include "ash/display/window_tree_host_manager.h" | 15 #include "ash/common/wm_display_observer.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 18 #include "ui/views/view.h" | 18 #include "ui/views/view.h" |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ash { |
| 21 |
| 21 class DisplayView; | 22 class DisplayView; |
| 22 | 23 |
| 23 namespace test { | 24 class ASH_EXPORT TrayDisplay : public SystemTrayItem, public WmDisplayObserver { |
| 24 class AshTestBase; | |
| 25 } | |
| 26 | |
| 27 class ASH_EXPORT TrayDisplay : public SystemTrayItem, | |
| 28 public WindowTreeHostManager::Observer { | |
| 29 public: | 25 public: |
| 30 explicit TrayDisplay(SystemTray* system_tray); | 26 explicit TrayDisplay(SystemTray* system_tray); |
| 31 ~TrayDisplay() override; | 27 ~TrayDisplay() override; |
| 32 | 28 |
| 33 // Overridden from WindowTreeHostManagerObserver: | 29 // Overridden from WmDisplayObserver: |
| 34 void OnDisplayConfigurationChanged() override; | 30 void OnDisplayConfigurationChanged() override; |
| 35 | 31 |
| 36 private: | 32 private: |
| 37 friend class TrayDisplayTest; | 33 friend class TrayDisplayTest; |
| 38 | 34 |
| 39 typedef std::map<int64_t, DisplayInfo> DisplayInfoMap; | 35 typedef std::map<int64_t, DisplayInfo> DisplayInfoMap; |
| 40 | 36 |
| 41 static const char kNotificationId[]; | 37 static const char kNotificationId[]; |
| 42 | 38 |
| 43 // Scans the current display info and updates |display_info_|. Sets the | 39 // Scans the current display info and updates |display_info_|. Sets the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 | 67 |
| 72 DisplayView* default_; | 68 DisplayView* default_; |
| 73 DisplayInfoMap display_info_; | 69 DisplayInfoMap display_info_; |
| 74 | 70 |
| 75 DISALLOW_COPY_AND_ASSIGN(TrayDisplay); | 71 DISALLOW_COPY_AND_ASSIGN(TrayDisplay); |
| 76 }; | 72 }; |
| 77 | 73 |
| 78 } // namespace ash | 74 } // namespace ash |
| 79 | 75 |
| 80 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ | 76 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ |
| OLD | NEW |