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

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

Issue 17445002: Updates the display message in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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 <map>
9
8 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
11 #include "ash/display/display_info.h"
9 #include "ash/system/tray/system_tray_item.h" 12 #include "ash/system/tray/system_tray_item.h"
13 #include "base/string16.h"
10 14
11 namespace views { 15 namespace views {
12 class View; 16 class View;
13 } 17 }
14 18
15 namespace ash { 19 namespace ash {
16 namespace internal { 20 namespace internal {
17 21
18 enum TrayDisplayMode {
19 TRAY_DISPLAY_SINGLE,
20 TRAY_DISPLAY_EXTENDED,
21 TRAY_DISPLAY_MIRRORED,
22 TRAY_DISPLAY_DOCKED,
23 };
24
25 class DisplayView; 22 class DisplayView;
26 class DisplayNotificationView; 23 class DisplayNotificationView;
27 24
28 class TrayDisplay : public SystemTrayItem, 25 class TrayDisplay : public SystemTrayItem,
29 public DisplayController::Observer { 26 public DisplayController::Observer {
30 public: 27 public:
31 explicit TrayDisplay(SystemTray* system_tray); 28 explicit TrayDisplay(SystemTray* system_tray);
32 virtual ~TrayDisplay(); 29 virtual ~TrayDisplay();
33 30
34 private: 31 private:
32 // Checks the current display settings and determine what message should be
33 // shown for notification.
34 base::string16 GetDisplayMessageForNotification();
35
35 // Overridden from SystemTrayItem. 36 // Overridden from SystemTrayItem.
36 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; 37 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
37 virtual views::View* CreateNotificationView( 38 virtual views::View* CreateNotificationView(
38 user::LoginStatus status) OVERRIDE; 39 user::LoginStatus status) OVERRIDE;
39 virtual void DestroyDefaultView() OVERRIDE; 40 virtual void DestroyDefaultView() OVERRIDE;
40 virtual void DestroyNotificationView() OVERRIDE; 41 virtual void DestroyNotificationView() OVERRIDE;
41 virtual bool ShouldShowLauncher() const OVERRIDE; 42 virtual bool ShouldShowLauncher() const OVERRIDE;
42 43
43 // Overridden from DisplayControllerObserver: 44 // Overridden from DisplayControllerObserver:
44 virtual void OnDisplayConfigurationChanged() OVERRIDE; 45 virtual void OnDisplayConfigurationChanged() OVERRIDE;
45 46
46 DisplayView* default_; 47 DisplayView* default_;
47 DisplayNotificationView* notification_; 48 DisplayNotificationView* notification_;
48 TrayDisplayMode current_mode_; 49 string16 current_message_;
50 std::map<int64, DisplayInfo> display_info_;
49 51
50 DISALLOW_COPY_AND_ASSIGN(TrayDisplay); 52 DISALLOW_COPY_AND_ASSIGN(TrayDisplay);
51 }; 53 };
52 54
53 } // namespace internal 55 } // namespace internal
54 } // namespace ash 56 } // namespace ash
55 57
56 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ 58 #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698