| OLD | NEW |
| 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 CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "ash/launcher/launcher_delegate.h" | 12 #include "ash/launcher/launcher_delegate.h" |
| 13 #include "ash/launcher/launcher_model_observer.h" | 13 #include "ash/launcher/launcher_model_observer.h" |
| 14 #include "ash/launcher/launcher_types.h" | 14 #include "ash/launcher/launcher_types.h" |
| 15 #include "ash/shell_observer.h" | 15 #include "ash/shell_observer.h" |
| 16 #include "ash/wm/shelf_types.h" | 16 #include "ash/wm/shelf_types.h" |
| 17 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
| 18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
| 19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 20 #include "base/prefs/public/pref_change_registrar.h" | 20 #include "base/prefs/public/pref_change_registrar.h" |
| 21 #include "base/prefs/public/pref_observer.h" |
| 21 #include "chrome/browser/extensions/extension_prefs.h" | 22 #include "chrome/browser/extensions/extension_prefs.h" |
| 22 #include "chrome/browser/prefs/pref_service_observer.h" | 23 #include "chrome/browser/prefs/pref_service_observer.h" |
| 23 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" | 24 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" |
| 24 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 25 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 25 #include "content/public/browser/notification_observer.h" | 26 #include "content/public/browser/notification_observer.h" |
| 26 #include "content/public/browser/notification_registrar.h" | 27 #include "content/public/browser/notification_registrar.h" |
| 27 #include "ui/aura/window_observer.h" | 28 #include "ui/aura/window_observer.h" |
| 28 | 29 |
| 29 class AppSyncUIState; | 30 class AppSyncUIState; |
| 30 class Browser; | 31 class Browser; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 53 // * Tabbed browsers and browser app windows have BrowserLauncherItemController, | 54 // * Tabbed browsers and browser app windows have BrowserLauncherItemController, |
| 54 // owned by the BrowserView instance. | 55 // owned by the BrowserView instance. |
| 55 // * App shell windows have ShellWindowLauncherItemController, owned by | 56 // * App shell windows have ShellWindowLauncherItemController, owned by |
| 56 // ShellWindowLauncherController. | 57 // ShellWindowLauncherController. |
| 57 // * Shortcuts have no LauncherItemController. | 58 // * Shortcuts have no LauncherItemController. |
| 58 class ChromeLauncherControllerPerBrowser | 59 class ChromeLauncherControllerPerBrowser |
| 59 : public ash::LauncherModelObserver, | 60 : public ash::LauncherModelObserver, |
| 60 public ash::ShellObserver, | 61 public ash::ShellObserver, |
| 61 public ChromeLauncherController, | 62 public ChromeLauncherController, |
| 62 public content::NotificationObserver, | 63 public content::NotificationObserver, |
| 64 public PrefObserver, |
| 63 public PrefServiceObserver, | 65 public PrefServiceObserver, |
| 64 public AppSyncUIStateObserver { | 66 public AppSyncUIStateObserver { |
| 65 public: | 67 public: |
| 66 ChromeLauncherControllerPerBrowser(Profile* profile, | 68 ChromeLauncherControllerPerBrowser(Profile* profile, |
| 67 ash::LauncherModel* model); | 69 ash::LauncherModel* model); |
| 68 virtual ~ChromeLauncherControllerPerBrowser(); | 70 virtual ~ChromeLauncherControllerPerBrowser(); |
| 69 | 71 |
| 70 // ChromeLauncherController overrides: | 72 // ChromeLauncherController overrides: |
| 71 | 73 |
| 72 // Initializes this ChromeLauncherControllerPerBrowser. | 74 // Initializes this ChromeLauncherControllerPerBrowser. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE; | 230 virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE; |
| 229 virtual void LauncherItemChanged(int index, | 231 virtual void LauncherItemChanged(int index, |
| 230 const ash::LauncherItem& old_item) OVERRIDE; | 232 const ash::LauncherItem& old_item) OVERRIDE; |
| 231 virtual void LauncherStatusChanged() OVERRIDE; | 233 virtual void LauncherStatusChanged() OVERRIDE; |
| 232 | 234 |
| 233 // Overridden from content::NotificationObserver: | 235 // Overridden from content::NotificationObserver: |
| 234 virtual void Observe(int type, | 236 virtual void Observe(int type, |
| 235 const content::NotificationSource& source, | 237 const content::NotificationSource& source, |
| 236 const content::NotificationDetails& details) OVERRIDE; | 238 const content::NotificationDetails& details) OVERRIDE; |
| 237 | 239 |
| 240 // Overridden from PrefObserver: |
| 241 virtual void OnPreferenceChanged(PrefServiceBase* service, |
| 242 const std::string& pref_name) OVERRIDE; |
| 243 |
| 238 // Overridden from ash::ShellObserver: | 244 // Overridden from ash::ShellObserver: |
| 239 virtual void OnShelfAlignmentChanged() OVERRIDE; | 245 virtual void OnShelfAlignmentChanged() OVERRIDE; |
| 240 | 246 |
| 241 // Overridden from PrefServiceObserver: | 247 // Overridden from PrefServiceObserver: |
| 242 virtual void OnIsSyncingChanged() OVERRIDE; | 248 virtual void OnIsSyncingChanged() OVERRIDE; |
| 243 | 249 |
| 244 // Overridden from AppSyncUIStateObserver | 250 // Overridden from AppSyncUIStateObserver |
| 245 virtual void OnAppSyncUIStatusChanged() OVERRIDE; | 251 virtual void OnAppSyncUIStatusChanged() OVERRIDE; |
| 246 | 252 |
| 247 protected: | 253 protected: |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 content::NotificationRegistrar notification_registrar_; | 334 content::NotificationRegistrar notification_registrar_; |
| 329 | 335 |
| 330 PrefChangeRegistrar pref_change_registrar_; | 336 PrefChangeRegistrar pref_change_registrar_; |
| 331 | 337 |
| 332 AppSyncUIState* app_sync_ui_state_; | 338 AppSyncUIState* app_sync_ui_state_; |
| 333 | 339 |
| 334 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerBrowser); | 340 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerBrowser); |
| 335 }; | 341 }; |
| 336 | 342 |
| 337 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER
_H_ | 343 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER
_H_ |
| OLD | NEW |