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