SystemTrayDelegate ownership -> Shell


BUG=159543


Review URL: https://chromiumcodereview.appspot.com/11293112

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166374 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ash/shell.h b/ash/shell.h
index 78a81af..41ce0dd2 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -72,8 +72,8 @@
 class SessionStateController;
 class ShellDelegate;
 class ShellObserver;
-class SystemTrayDelegate;
 class SystemTray;
+class SystemTrayDelegate;
 class UserActivityDetector;
 class UserWallpaperDelegate;
 class VideoDetector;
@@ -370,9 +370,13 @@
   // status_area_widget() has been destroyed; check status_area_widget()
   // before calling these in destructors.
   internal::StatusAreaWidget* status_area_widget();
-  SystemTrayDelegate* tray_delegate();
   SystemTray* system_tray();
 
+  // TODO(stevenjb): Rename to system_tray_delegate().
+  SystemTrayDelegate* tray_delegate() {
+    return system_tray_delegate_.get();
+  }
+
   static void set_initially_hide_cursor(bool hide) {
     initially_hide_cursor_ = hide;
   }
@@ -458,6 +462,7 @@
 #endif  // !defined(OS_MACOSX)
 
   scoped_ptr<ShellDelegate> delegate_;
+  scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
   scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
   scoped_ptr<CapsLockDelegate> caps_lock_delegate_;