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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h

Issue 580713002: Close the App Info Dialog if the app or profile becomes invalid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fixes 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/views/apps/app_info_dialog/app_info_dialog_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h
index 92be146a16f2f29097207625028f349104dc9852..d1aebbaa76cde9d0b4be631363f2ac4a2c0ce603 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DIALOG_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DIALOG_VIEWS_H_
+#include "extensions/browser/extension_registry_observer.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/views/view.h"
@@ -12,6 +13,7 @@ class Profile;
namespace extensions {
class Extension;
+class ExtensionRegistry;
}
namespace views {
@@ -20,7 +22,8 @@ class ScrollView;
// View the information about a particular chrome application.
-class AppInfoDialog : public views::View {
+class AppInfoDialog : public views::View,
+ public extensions::ExtensionRegistryObserver {
public:
AppInfoDialog(gfx::NativeWindow parent_window,
Profile* profile,
@@ -28,11 +31,28 @@ class AppInfoDialog : public views::View {
virtual ~AppInfoDialog();
private:
+ // Closes the dialog.
+ void Close();
+
+ void StartObservingExtensionRegistry();
+ void StopObservingExtensionRegistry();
+
+ // Overridden from extensions::ExtensionRegistryObserver:
+ virtual void OnExtensionUninstalled(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UninstallReason reason) OVERRIDE;
+ virtual void OnShutdown(extensions::ExtensionRegistry* registry) OVERRIDE;
+
// UI elements of the dialog.
views::View* dialog_header_;
views::ScrollView* dialog_body_;
views::View* dialog_footer_;
+ Profile* profile_;
+ std::string app_id_;
+ extensions::ExtensionRegistry* extension_registry_;
+
DISALLOW_COPY_AND_ASSIGN(AppInfoDialog);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698