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