Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Side by Side Diff: ash/system/chromeos/tray_display.h

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary forward declarations. Renamed |tray| to |owner|. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chromeos/display/output_configurator.h" 12 #include "chromeos/display/output_configurator.h"
13 13
14 namespace views { 14 namespace views {
15 class View; 15 class View;
16 } 16 }
17 17
18 namespace ash { 18 namespace ash {
19
20 namespace internal { 19 namespace internal {
21 class DisplayView; 20 class DisplayView;
22 21
23 class TrayDisplay : public SystemTrayItem, 22 class TrayDisplay : public SystemTrayItem,
24 public chromeos::OutputConfigurator::Observer, 23 public chromeos::OutputConfigurator::Observer,
25 public gfx::DisplayObserver { 24 public gfx::DisplayObserver {
26 public: 25 public:
27 TrayDisplay(); 26 explicit TrayDisplay(SystemTray* system_tray);
28 virtual ~TrayDisplay(); 27 virtual ~TrayDisplay();
29 28
30 private: 29 private:
31 // Overridden from SystemTrayItem. 30 // Overridden from SystemTrayItem.
32 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; 31 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
33 virtual void DestroyDefaultView() OVERRIDE; 32 virtual void DestroyDefaultView() OVERRIDE;
34 33
35 // Overridden from aura::DisplayObserver 34 // Overridden from aura::DisplayObserver
36 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; 35 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
37 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; 36 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
38 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; 37 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
39 38
40 // Overridden from chromeos::OutputConfigurator::Observer 39 // Overridden from chromeos::OutputConfigurator::Observer
41 virtual void OnDisplayModeChanged() OVERRIDE; 40 virtual void OnDisplayModeChanged() OVERRIDE;
42 41
43 DisplayView* default_; 42 DisplayView* default_;
44 43
45 DISALLOW_COPY_AND_ASSIGN(TrayDisplay); 44 DISALLOW_COPY_AND_ASSIGN(TrayDisplay);
46 }; 45 };
47 46
48 } // namespace internal 47 } // namespace internal
49 } // namespace ash 48 } // namespace ash
50 49
51 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ 50 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698