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

Unified Diff: ash/system/tray/system_tray.h

Issue 10140017: ash: Some code-cleanup in the system-tray code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/tray/system_tray.h
diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h
index 58049ec3f0150eac8ec62838ac629099a497b901..b9dbab2a672805757c6b88f9820440078fbfe132 100644
--- a/ash/system/tray/system_tray.h
+++ b/ash/system/tray/system_tray.h
@@ -49,6 +49,12 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
SystemTray();
virtual ~SystemTray();
+ // Creates the default set of items for the sytem tray.
+ void CreateItems();
+
+ // Creates the widget for the tray.
+ void CreateWidget();
+
// Adds a new item in the tray.
void AddTrayItem(SystemTrayItem* item);
@@ -82,6 +88,8 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
// Returns true if the launcher should show.
bool should_show_launcher() const { return popup_ && should_show_launcher_; }
+ views::Widget* widget() const { return widget_; }
+
AccessibilityObserver* accessibility_observer() const {
return accessibility_observer_;
}
@@ -117,8 +125,6 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
}
private:
- friend class Shell;
-
void ShowItems(std::vector<SystemTrayItem*>& items,
bool details,
bool activate);
@@ -164,6 +170,9 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE(
UpdateObserver* update_observer_;
UserObserver* user_observer_;
+ // The widget hosting the tray.
+ views::Widget* widget_;
+
// The popup widget and the delegate.
internal::SystemTrayBubble* bubble_;
views::Widget* popup_;

Powered by Google App Engine
This is Rietveld 408576698