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

Side by Side Diff: ash/system/tray/system_tray_delegate.h

Issue 11312139: Add SystemTrayObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_TRAY_SYSTEM_TRAY_DELEGATE_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/system/locale/locale_observer.h"
12 #include "ash/system/power/power_supply_status.h" 13 #include "ash/system/power/power_supply_status.h"
13 #include "ash/system/user/login_status.h" 14 #include "ash/system/user/login_status.h"
14 #include "base/file_path.h" 15 #include "base/file_path.h"
15 #include "base/i18n/time_formatting.h" 16 #include "base/i18n/time_formatting.h"
16 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
17 #include "base/string16.h" 18 #include "base/string16.h"
18 #include "ui/gfx/image/image_skia.h" 19 #include "ui/gfx/image/image_skia.h"
19 20
20 namespace ash { 21 namespace ash {
21 22
23 class SystemTrayObservers;
24
22 struct ASH_EXPORT NetworkIconInfo { 25 struct ASH_EXPORT NetworkIconInfo {
23 NetworkIconInfo(); 26 NetworkIconInfo();
24 ~NetworkIconInfo(); 27 ~NetworkIconInfo();
25 28
26 bool highlight; 29 bool highlight;
27 bool tray_icon_visible; 30 bool tray_icon_visible;
28 gfx::ImageSkia image; 31 gfx::ImageSkia image;
29 string16 name; 32 string16 name;
30 string16 description; 33 string16 description;
31 std::string service_path; 34 std::string service_path;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 103
101 class VolumeControlDelegate; 104 class VolumeControlDelegate;
102 105
103 class SystemTrayDelegate { 106 class SystemTrayDelegate {
104 public: 107 public:
105 virtual ~SystemTrayDelegate() {} 108 virtual ~SystemTrayDelegate() {}
106 109
107 // Called after SystemTray has been instantiated. 110 // Called after SystemTray has been instantiated.
108 virtual void Initialize() = 0; 111 virtual void Initialize() = 0;
109 112
113 // Returns a SystemTrayObservers, or NULL of observers are not implemented.
114 virtual SystemTrayObservers* GetSystemTrayObservers() = 0;
115
110 // Returns true if system tray should be visible on startup. 116 // Returns true if system tray should be visible on startup.
111 virtual bool GetTrayVisibilityOnStartup() = 0; 117 virtual bool GetTrayVisibilityOnStartup() = 0;
112 118
113 // Gets information about the logged in user. 119 // Gets information about the logged in user.
114 virtual const string16 GetUserDisplayName() const = 0; 120 virtual const string16 GetUserDisplayName() const = 0;
115 virtual const std::string GetUserEmail() const = 0; 121 virtual const std::string GetUserEmail() const = 0;
116 virtual const gfx::ImageSkia& GetUserImage() const = 0; 122 virtual const gfx::ImageSkia& GetUserImage() const = 0;
117 virtual user::LoginStatus GetUserLoginStatus() const = 0; 123 virtual user::LoginStatus GetUserLoginStatus() const = 0;
118 124
119 // Returns whether a system upgrade is available. 125 // Returns whether a system upgrade is available.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 virtual void SetVolumeControlDelegate( 295 virtual void SetVolumeControlDelegate(
290 scoped_ptr<VolumeControlDelegate> delegate) = 0; 296 scoped_ptr<VolumeControlDelegate> delegate) = 0;
291 297
292 // Creates a dummy delegate for testing. 298 // Creates a dummy delegate for testing.
293 static SystemTrayDelegate* CreateDummyDelegate(); 299 static SystemTrayDelegate* CreateDummyDelegate();
294 }; 300 };
295 301
296 } // namespace ash 302 } // namespace ash
297 303
298 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 304 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698