Chromium Code Reviews| Index: extensions/browser/app_window/app_window.h |
| diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h |
| index 72d3090fdef64ccfd60a5ccc7d0e9e9637796312..6c1f07c890058ede399a845c6912b27777e8a05c 100644 |
| --- a/extensions/browser/app_window/app_window.h |
| +++ b/extensions/browser/app_window/app_window.h |
| @@ -19,7 +19,6 @@ |
| #include "content/public/browser/web_contents_delegate.h" |
| #include "content/public/browser/web_contents_observer.h" |
| #include "extensions/browser/extension_function_dispatcher.h" |
| -#include "extensions/browser/extension_icon_image.h" |
| #include "extensions/browser/extension_registry_observer.h" |
| #include "ui/base/ui_base_types.h" // WindowShowState |
| #include "ui/gfx/geometry/rect.h" |
| @@ -87,7 +86,6 @@ class AppWindowContents { |
| class AppWindow : public content::WebContentsDelegate, |
| public content::WebContentsObserver, |
| public web_modal::WebContentsModalDialogManagerDelegate, |
| - public IconImage::Observer, |
| public ExtensionFunctionDispatcher::Delegate, |
| public ExtensionRegistryObserver { |
| public: |
| @@ -239,7 +237,7 @@ class AppWindow : public content::WebContentsDelegate, |
| window_type_ == WINDOW_TYPE_V1_PANEL); |
| } |
| content::BrowserContext* browser_context() const { return browser_context_; } |
| - const gfx::Image& app_icon() const { return app_icon_; } |
| + const gfx::Image& custom_app_icon() const { return custom_app_icon_; } |
| const GURL& app_icon_url() const { return app_icon_url_; } |
| const GURL& initial_url() const { return initial_url_; } |
| bool is_hidden() const { return is_hidden_; } |
| @@ -360,10 +358,6 @@ class AppWindow : public content::WebContentsDelegate, |
| // unblock resource requests. |
| void NotifyRenderViewReady(); |
| - // Returns true if window has custom icon in case either |window_icon_url_| or |
| - // |app_icon_url_| is set. Custom icon may be not loaded yet. |
| - bool HasCustomIcon() const; |
| - |
| // Whether the app window wants to be alpha enabled. |
| bool requested_alpha_enabled() const { return requested_alpha_enabled_; } |
| @@ -375,7 +369,7 @@ class AppWindow : public content::WebContentsDelegate, |
| bool show_in_shelf() const { return show_in_shelf_; } |
| - const GURL& window_icon_url() const { return window_icon_url_; } |
| + AppDelegate* app_delegate() { return app_delegate_.get(); } |
| void SetAppWindowContentsForTesting( |
| std::unique_ptr<AppWindowContents> contents) { |
| @@ -476,9 +470,6 @@ class AppWindow : public content::WebContentsDelegate, |
| // CreateParams that should be used to create the window. |
| CreateParams LoadDefaults(CreateParams params) const; |
| - // Load the app's image, firing a load state change when loaded. |
| - void UpdateExtensionAppIcon(); |
| - |
| // Set the fullscreen state in the native app window. |
| void SetNativeWindowFullscreen(); |
| @@ -504,9 +495,6 @@ class AppWindow : public content::WebContentsDelegate, |
| const std::vector<SkBitmap>& bitmaps, |
| const std::vector<gfx::Size>& original_bitmap_sizes); |
| - // IconImage::Observer implementation. |
| - void OnExtensionIconImageChanged(IconImage* image) override; |
| - |
| // The browser context with which this window is associated. AppWindow does |
| // not own this object. |
| content::BrowserContext* browser_context_; |
| @@ -520,16 +508,13 @@ class AppWindow : public content::WebContentsDelegate, |
| const SessionID session_id_; |
| WindowType window_type_; |
| - // Icon shown in the task bar. |
| - gfx::Image app_icon_; |
| + // Custom icon shown in the task bar or in shelf. |
|
msw
2017/05/23 00:02:30
nit: the shelf is chrome's 'task bar', so you can
khmel
2017/05/23 16:11:44
Done.
|
| + gfx::Image custom_app_icon_; |
| // Icon URL to be used for setting the app icon. If not empty, app_icon_ will |
| // be fetched and set using this URL. |
| GURL app_icon_url_; |
| - // An object to load the app's icon as an extension resource. |
| - std::unique_ptr<IconImage> app_icon_image_; |
| - |
| std::unique_ptr<NativeAppWindow> native_app_window_; |
| std::unique_ptr<AppWindowContents> app_window_contents_; |
| std::unique_ptr<AppDelegate> app_delegate_; |
| @@ -568,11 +553,6 @@ class AppWindow : public content::WebContentsDelegate, |
| // Whether |show_in_shelf| was set in the CreateParams. |
| bool show_in_shelf_; |
| - // Icon URL to be used for setting the window icon. If not empty, |
| - // app_icon_ will be fetched and set using this URL and will have |
| - // app_icon_image_ as a badge. |
| - GURL window_icon_url_; |
| - |
| // PlzNavigate: this is called when the first navigation is ready to commit. |
| base::Closure on_first_commit_callback_; |