| Index: chrome/browser/extensions/extension_install_prompt.h
|
| diff --git a/chrome/browser/extensions/extension_install_ui.h b/chrome/browser/extensions/extension_install_prompt.h
|
| similarity index 88%
|
| copy from chrome/browser/extensions/extension_install_ui.h
|
| copy to chrome/browser/extensions/extension_install_prompt.h
|
| index 4f6307d23f09933cf5837e688c4b8792ecffb163..efbdaa45ea948930dd9ab12933425b52b15922e1 100644
|
| --- a/chrome/browser/extensions/extension_install_ui.h
|
| +++ b/chrome/browser/extensions/extension_install_prompt.h
|
| @@ -2,14 +2,15 @@
|
| // 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
|
| #pragma once
|
|
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "base/string16.h"
|
| #include "chrome/browser/extensions/image_loading_tracker.h"
|
| #include "chrome/common/extensions/url_pattern.h"
|
| @@ -17,7 +18,7 @@
|
| #include "ui/gfx/image/image.h"
|
| #include "ui/gfx/native_widget_types.h"
|
|
|
| -class Browser;
|
| +class ExtensionInstallUI;
|
| class ExtensionPermissionSet;
|
| class MessageLoop;
|
| class Profile;
|
| @@ -26,15 +27,15 @@ class TabContentsWrapper;
|
|
|
| namespace base {
|
| class DictionaryValue;
|
| -}
|
| +} // namespace base
|
|
|
| namespace extensions {
|
| class BundleInstaller;
|
| class Extension;
|
| -}
|
| +} // namespace extensions
|
|
|
| // Displays all the UI around extension installation.
|
| -class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| +class ExtensionInstallPrompt : public ImageLoadingTracker::Observer {
|
| public:
|
| enum PromptType {
|
| UNSET_PROMPT_TYPE = -1,
|
| @@ -147,8 +148,8 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| const std::string& localized_description,
|
| std::string* error);
|
|
|
| - explicit ExtensionInstallUI(Profile* profile);
|
| - virtual ~ExtensionInstallUI();
|
| + explicit ExtensionInstallPrompt(Profile* profile);
|
| + virtual ~ExtensionInstallPrompt();
|
|
|
| // 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
|
| @@ -221,9 +222,6 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| const std::string& extension_id,
|
| int index) OVERRIDE;
|
|
|
| - // Opens apps UI and animates the app icon for the app with id |app_id|.
|
| - static void OpenAppInstalledUI(Browser* browser, const std::string& app_id);
|
| -
|
| protected:
|
| friend class ExtensionNoConfirmWebstorePrivateApiTest;
|
| friend class WebstoreInlineInstallUnpackFailureTest;
|
| @@ -235,13 +233,6 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| private:
|
| friend class GalleryInstallApiTestObserver;
|
|
|
| - // Show an infobar for a newly-installed theme. previous_theme_id
|
| - // should be empty if the previous theme was the system/default
|
| - // theme.
|
| - static void ShowThemeInfoBar(
|
| - const std::string& previous_theme_id, bool previous_using_native_theme,
|
| - const extensions::Extension* new_theme, Profile* profile);
|
| -
|
| // Sets the icon that will be used in any UI. If |icon| is NULL, or contains
|
| // an empty bitmap, then a default icon will be used instead.
|
| void SetIcon(const SkBitmap* icon);
|
| @@ -254,21 +245,9 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| // Shows the actual UI (the icon should already be loaded).
|
| void ShowConfirmation();
|
|
|
| - // Returns the delegate to control the browser's info bar. This is
|
| - // within its own function due to its platform-specific nature.
|
| - static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate(
|
| - TabContentsWrapper* tab_contents,
|
| - const extensions::Extension* new_theme,
|
| - const std::string& previous_theme_id,
|
| - bool previous_using_native_theme);
|
| -
|
| Profile* profile_;
|
| MessageLoop* ui_loop_;
|
|
|
| - // Used to undo theme installation.
|
| - std::string previous_theme_id_;
|
| - bool previous_using_native_theme_;
|
| -
|
| // The extensions installation icon.
|
| SkBitmap icon_;
|
|
|
| @@ -281,6 +260,9 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| // The permissions being prompted for.
|
| scoped_refptr<const ExtensionPermissionSet> permissions_;
|
|
|
| + // The object responsible for doing the UI specific actions.
|
| + scoped_ptr<ExtensionInstallUI> install_ui_;
|
| +
|
| // The delegate we will call Proceed/Abort on after confirmation UI.
|
| Delegate* delegate_;
|
|
|
| @@ -302,4 +284,4 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
|
| bool skip_post_install_ui_;
|
| };
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_
|
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
|
|
|