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

Unified Diff: extensions/browser/install/extension_install_ui.h

Issue 634313004: Display dialog when app install succeeds / fails on Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: extensions/browser/install/extension_install_ui.h
diff --git a/chrome/browser/extensions/extension_install_ui.h b/extensions/browser/install/extension_install_ui.h
similarity index 54%
rename from chrome/browser/extensions/extension_install_ui.h
rename to extensions/browser/install/extension_install_ui.h
index 409bfcad28e466cb646a18ad2645aaf0ddbc93da..f9cbe4b04f704601295c8d554c5050c166e6350f 100644
--- a/chrome/browser/extensions/extension_install_ui.h
+++ b/extensions/browser/install/extension_install_ui.h
@@ -2,30 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_
+#ifndef EXTENSIONS_BROWSER_INSTALL_EXTENSION_INSTALL_UI_H_
+#define EXTENSIONS_BROWSER_INSTALL_EXTENSION_INSTALL_UI_H_
#include <string>
#include "base/basictypes.h"
+#include "ui/gfx/native_widget_types.h"
-class Browser;
-class ExtensionInstallPrompt;
-class Profile;
class SkBitmap;
namespace extensions {
class CrxInstallerError;
class Extension;
-class ExtensionWebstorePrivateApiTest;
-}
// Interface that should be implemented for each platform to display all the UI
// around extension installation.
class ExtensionInstallUI {
public:
- static ExtensionInstallUI* Create(Profile* profile);
-
+ ExtensionInstallUI();
virtual ~ExtensionInstallUI();
// Called when an extension was installed.
@@ -35,20 +30,23 @@ class ExtensionInstallUI {
// Called when an extension failed to install.
virtual void OnInstallFailure(const extensions::CrxInstallerError& error) = 0;
-
// TODO(asargent) Normally we navigate to the new tab page when an app is
// installed, but we're experimenting with instead showing a bubble when
// an app is installed which points to the new tab button. This may become
// the default behavior in the future.
virtual void SetUseAppInstalledBubble(bool use_bubble) = 0;
- // Whether or not to show the default UI after completing the installation.
- void set_skip_post_install_ui(bool skip_ui) {
- skip_post_install_ui_ = skip_ui;
- }
-
// Opens apps UI and animates the app icon for the app with id |app_id|.
- static void OpenAppInstalledUI(Profile* profile, const std::string& app_id);
+ virtual void OpenAppInstalledUI(const std::string& app_id) = 0;
+
+ // Sets whether to show the default UI after completing the installation.
+ virtual void SetSkipPostInstallUI(bool skip_ui) = 0;
+
+ // Returns the gfx::NativeWindow to use as the parent for install dialogs.
+ // Returns NULL if the install dialog should be a top level window. This
+ // method is deprecated - do not add new callers.
+ // TODO(pkotwicz): Remove this method. crbug.com/422474
+ virtual gfx::NativeWindow GetDefaultInstallDialogParent() = 0;
#if defined(UNIT_TEST)
static void set_disable_failure_ui_for_tests() {
@@ -56,37 +54,17 @@ class ExtensionInstallUI {
}
#endif
- // Creates an ExtensionInstallPrompt from |browser|.
- // Caller assumes ownership.
- static ExtensionInstallPrompt* CreateInstallPromptWithBrowser(
- Browser* browser);
-
- // Creates an ExtensionInstallPrompt from |profile|.
- // Caller assumes ownership. This method is deprecated and should not be used
- // in new code.
- static ExtensionInstallPrompt* CreateInstallPromptWithProfile(
- Profile* profile);
-
- Profile* profile() { return profile_; }
-
protected:
- explicit ExtensionInstallUI(Profile* profile);
-
static bool disable_failure_ui_for_tests() {
return disable_failure_ui_for_tests_;
}
- bool skip_post_install_ui() const { return skip_post_install_ui_; }
-
private:
static bool disable_failure_ui_for_tests_;
- Profile* profile_;
-
- // Whether or not to show the default UI after completing the installation.
- bool skip_post_install_ui_;
-
DISALLOW_COPY_AND_ASSIGN(ExtensionInstallUI);
};
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_INSTALL_EXTENSION_INSTALL_UI_H_
« no previous file with comments | « extensions/browser/install/crx_installer_error.h ('k') | extensions/browser/install/extension_install_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698