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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.h

Issue 2900783003: Handle app custom icon via aura::Window property. (Closed)
Patch Set: cleanup Created 3 years, 7 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: chrome/browser/ui/views/apps/chrome_native_app_window_views.h
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
index 2e7122266df12208847c13931dfb30ecdf68a3dd..f38769c191db334b7c008ff7e910c9ad81c90992 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
@@ -8,12 +8,18 @@
#include <memory>
#include "base/macros.h"
+#include "chrome/browser/extensions/chrome_app_icon_delegate.h"
#include "extensions/components/native_app_window/native_app_window_views.h"
class ExtensionKeybindingRegistryViews;
+namespace extensions {
+class ChromeAppIcon;
msw 2017/05/23 00:02:29 nit: not needed (fwd decl in chrome_app_icon_deleg
khmel 2017/05/23 16:11:44 Done.
+}
+
class ChromeNativeAppWindowViews
- : public native_app_window::NativeAppWindowViews {
+ : public native_app_window::NativeAppWindowViews,
+ public extensions::ChromeAppIconDelegate {
public:
ChromeNativeAppWindowViews();
~ChromeNativeAppWindowViews() override;
@@ -70,6 +76,11 @@ class ChromeNativeAppWindowViews
const extensions::AppWindow::CreateParams& create_params) override;
private:
+ void EnsureAppIconCreated();
msw 2017/05/23 00:02:30 nit: comment.
khmel 2017/05/23 16:11:44 Done.
+
+ // extensions::ChromeAppIconDelegate:
+ void OnIconUpdated(extensions::ChromeAppIcon* icon) override;
+
// Custom shape of the window. If this is not set then the window has a
// default shape, usually rectangular.
std::unique_ptr<SkRegion> shape_;
@@ -83,6 +94,8 @@ class ChromeNativeAppWindowViews
std::unique_ptr<ExtensionKeybindingRegistryViews>
extension_keybinding_registry_;
+ std::unique_ptr<extensions::ChromeAppIcon> app_icon_;
msw 2017/05/23 00:02:29 nit: comment
khmel 2017/05/23 16:11:44 Done.
+
DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews);
};

Powered by Google App Engine
This is Rietveld 408576698