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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.h

Issue 565213002: ChromeLaunchController does proper action when extension unloaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: close window, unpin depending on profile Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
index d5f4e82b46a414e92ad7f4071091a7eea2e1776d..63875f705fb5a8e42ea370bc3c91953c51e1df50 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
@@ -31,8 +31,7 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
#include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/extension_registry_observer.h"
#include "ui/aura/window_observer.h"
class AppSyncUIState;
@@ -56,6 +55,7 @@ class Window;
}
namespace content {
+class BrowserContext;
class WebContents;
}
@@ -93,7 +93,7 @@ class ChromeLauncherController : public ash::ShelfDelegate,
public ash::ShelfModelObserver,
public ash::ShellObserver,
public ash::DisplayController::Observer,
- public content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver,
public extensions::AppIconLoader::Delegate,
public PrefServiceSyncableObserver,
public AppSyncUIStateObserver,
@@ -308,17 +308,21 @@ class ChromeLauncherController : public ash::ShelfDelegate,
const ash::ShelfItem& old_item) OVERRIDE;
virtual void ShelfStatusChanged() OVERRIDE;
- // content::NotificationObserver overrides:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// ash::ShellObserver overrides:
virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE;
// ash::DisplayController::Observer overrides:
virtual void OnDisplayConfigurationChanged() OVERRIDE;
+ // ExtensionRegistryObserver overrides:
+ virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension) OVERRIDE;
+ virtual void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
+
// PrefServiceSyncableObserver overrides:
virtual void OnIsSyncingChanged() OVERRIDE;
@@ -533,7 +537,8 @@ class ChromeLauncherController : public ash::ShelfDelegate,
// Close all windowed V1 applications of a certain extension which was already
// deleted.
- void CloseWindowedAppsFromRemovedExtension(const std::string& app_id);
+ void CloseWindowedAppsFromRemovedExtension(const std::string& app_id,
+ const Profile* profile);
// Set ShelfItemDelegate |item_delegate| for |id| and take an ownership.
// TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|.
@@ -575,8 +580,6 @@ class ChromeLauncherController : public ash::ShelfDelegate,
// Used to load the image for an app item.
scoped_ptr<extensions::AppIconLoader> app_icon_loader_;
- content::NotificationRegistrar notification_registrar_;
-
PrefChangeRegistrar pref_change_registrar_;
AppSyncUIState* app_sync_ui_state_;
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698