summaryrefslogtreecommitdiffstats
path: root/apps/shell_window.h
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-02 00:12:41 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-02 00:12:41 +0000
commit24ed4b909ddf9c798fa0a2bfab94fc51ae2ae18c (patch)
treec2a7e43256216ea436fb53759b2732da998d4b9c /apps/shell_window.h
parent7de0fa59bf5b948774c5cf6ec4aad31dfb031961 (diff)
downloadchromium_src-24ed4b909ddf9c798fa0a2bfab94fc51ae2ae18c.zip
chromium_src-24ed4b909ddf9c798fa0a2bfab94fc51ae2ae18c.tar.gz
chromium_src-24ed4b909ddf9c798fa0a2bfab94fc51ae2ae18c.tar.bz2
Make shell window provide hidpi icon.
Replace ImageLoader with IconImage that handles hidpi case. BUG=254472 Review URL: https://chromiumcodereview.appspot.com/21418002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215149 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/shell_window.h')
-rw-r--r--apps/shell_window.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/apps/shell_window.h b/apps/shell_window.h
index 5e449df..a10cb5b 100644
--- a/apps/shell_window.h
+++ b/apps/shell_window.h
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
-#define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
+#ifndef APPS_SHELL_WINDOW_H_
+#define APPS_SHELL_WINDOW_H_
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/extensions/extension_icon_image.h"
#include "chrome/browser/extensions/extension_keybinding_registry.h"
#include "chrome/browser/sessions/session_id.h"
#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
@@ -73,7 +74,8 @@ class ShellWindowContents {
class ShellWindow : public content::NotificationObserver,
public content::WebContentsDelegate,
public web_modal::WebContentsModalDialogManagerDelegate,
- public extensions::ExtensionKeybindingRegistry::Delegate {
+ public extensions::ExtensionKeybindingRegistry::Delegate,
+ public extensions::IconImage::Observer {
public:
enum WindowType {
WINDOW_TYPE_DEFAULT = 1 << 0, // Default shell window.
@@ -316,8 +318,6 @@ class ShellWindow : public content::NotificationObserver,
// Load the app's image, firing a load state change when loaded.
void UpdateExtensionAppIcon();
- void OnImageLoaded(const gfx::Image& image);
-
// extensions::ExtensionKeybindingRegistry::Delegate implementation.
virtual extensions::ActiveTabPermissionGranter*
GetActiveTabPermissionGranter() OVERRIDE;
@@ -333,6 +333,10 @@ class ShellWindow : public content::NotificationObserver,
int requested_size,
const std::vector<SkBitmap>& bitmaps);
+ // extensions::IconImage::Observer implementation.
+ virtual void OnExtensionIconImageChanged(
+ extensions::IconImage* image) OVERRIDE;
+
Profile* profile_; // weak pointer - owned by ProfileManager.
// weak pointer - owned by ExtensionService.
const extensions::Extension* extension_;
@@ -353,6 +357,9 @@ class ShellWindow : public content::NotificationObserver,
// be fetched and set using this URL.
GURL app_icon_url_;
+ // An object to load the app's icon as an extension resource.
+ scoped_ptr<extensions::IconImage> app_icon_image_;
+
scoped_ptr<NativeAppWindow> native_app_window_;
scoped_ptr<ShellWindowContents> shell_window_contents_;
scoped_ptr<Delegate> delegate_;
@@ -369,4 +376,4 @@ class ShellWindow : public content::NotificationObserver,
} // namespace apps
-#endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
+#endif // APPS_SHELL_WINDOW_H_