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

Unified Diff: ash/system/brightness/tray_brightness.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified CL to provide TrayItems and Tray*Views with parent pointers instead. 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/brightness/tray_brightness.cc
diff --git a/ash/system/brightness/tray_brightness.cc b/ash/system/brightness/tray_brightness.cc
index 425dc3b350510cae14f9e34e0ba50ae6617c7c6a..851d7dfa24924aaf583e45a66ec7046030960a67 100644
--- a/ash/system/brightness/tray_brightness.cc
+++ b/ash/system/brightness/tray_brightness.cc
@@ -8,6 +8,7 @@
#include "ash/ash_constants.h"
#include "ash/shell.h"
#include "ash/system/brightness/brightness_control_delegate.h"
+#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_views.h"
@@ -124,8 +125,9 @@ class BrightnessView : public views::View,
} // namespace tray
-TrayBrightness::TrayBrightness()
- : weak_ptr_factory_(this),
+TrayBrightness::TrayBrightness(SystemTray* system_tray)
+ : SystemTrayItem(system_tray),
+ weak_ptr_factory_(this),
brightness_view_(NULL),
is_default_view_(false),
current_percent_(100.0),

Powered by Google App Engine
This is Rietveld 408576698