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 "ash/display/display_controller.h" |
8 #include "ash/system/tray/system_tray_item.h" | 9 #include "ash/system/tray/system_tray_item.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/gfx/display_observer.h" | |
11 | |
12 #if defined(OS_CHROMEOS) | |
13 #include "chromeos/display/output_configurator.h" | |
14 #endif | |
15 | 10 |
16 namespace views { | 11 namespace views { |
17 class View; | 12 class View; |
18 } | 13 } |
19 | 14 |
20 namespace ash { | 15 namespace ash { |
21 namespace internal { | 16 namespace internal { |
| 17 |
| 18 enum TrayDisplayMode { |
| 19 TRAY_DISPLAY_SINGLE, |
| 20 TRAY_DISPLAY_EXTENDED, |
| 21 TRAY_DISPLAY_MIRRORED, |
| 22 TRAY_DISPLAY_DOCKED, |
| 23 }; |
| 24 |
22 class DisplayView; | 25 class DisplayView; |
| 26 class DisplayNotificationView; |
23 | 27 |
24 class TrayDisplay : public SystemTrayItem, | 28 class TrayDisplay : public SystemTrayItem, |
25 #if defined(OS_CHROMEOS) | 29 public DisplayController::Observer { |
26 public chromeos::OutputConfigurator::Observer, | |
27 #endif | |
28 public gfx::DisplayObserver { | |
29 public: | 30 public: |
30 explicit TrayDisplay(SystemTray* system_tray); | 31 explicit TrayDisplay(SystemTray* system_tray); |
31 virtual ~TrayDisplay(); | 32 virtual ~TrayDisplay(); |
32 | 33 |
33 private: | 34 private: |
34 // Overridden from SystemTrayItem. | 35 // Overridden from SystemTrayItem. |
35 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 36 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; |
| 37 virtual views::View* CreateNotificationView( |
| 38 user::LoginStatus status) OVERRIDE; |
36 virtual void DestroyDefaultView() OVERRIDE; | 39 virtual void DestroyDefaultView() OVERRIDE; |
| 40 virtual void DestroyNotificationView() OVERRIDE; |
| 41 virtual bool ShouldShowLauncher() const OVERRIDE; |
37 | 42 |
38 // Overridden from aura::DisplayObserver | 43 // Overridden from DisplayControllerObserver: |
39 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; | 44 virtual void OnDisplayConfigurationChanged() OVERRIDE; |
40 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; | |
41 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; | |
42 | |
43 #if defined(OS_CHROMEOS) | |
44 // Overridden from chromeos::OutputConfigurator::Observer | |
45 virtual void OnDisplayModeChanged() OVERRIDE; | |
46 #endif | |
47 | 45 |
48 DisplayView* default_; | 46 DisplayView* default_; |
| 47 DisplayNotificationView* notification_; |
| 48 TrayDisplayMode current_mode_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(TrayDisplay); | 50 DISALLOW_COPY_AND_ASSIGN(TrayDisplay); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace internal | 53 } // namespace internal |
54 } // namespace ash | 54 } // namespace ash |
55 | 55 |
56 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ | 56 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ |
OLD | NEW |