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

Unified Diff: extensions/browser/app_window/app_window.h

Issue 2209053004: Enhance chrome.app.window API with icon property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review v5 Created 4 years, 4 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
« no previous file with comments | « extensions/browser/api/app_window/app_window_api.cc ('k') | extensions/browser/app_window/app_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e30bab83f4e42725ef6e9ecc69b45b01c8a9212..fdf51c2aed657d4528761e71ab768cce4cffe34c 100644
--- a/extensions/browser/app_window/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -196,6 +196,9 @@ class AppWindow : public content::WebContentsDelegate,
// the app. Defaults to false.
bool show_in_shelf;
+ // Icon URL to be used for setting the window icon.
+ GURL window_icon_url;
+
// The API enables developers to specify content or window bounds. This
// function combines them into a single, constrained window size.
gfx::Rect GetInitialWindowBounds(const gfx::Insets& frame_insets) const;
@@ -375,6 +378,8 @@ class AppWindow : public content::WebContentsDelegate,
bool show_in_shelf() const { return show_in_shelf_; }
+ const GURL& window_icon_url() const { return window_icon_url_; }
+
void SetAppWindowContentsForTesting(
std::unique_ptr<AppWindowContents> contents) {
app_window_contents_ = std::move(contents);
@@ -580,6 +585,11 @@ 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_;
« no previous file with comments | « extensions/browser/api/app_window/app_window_api.cc ('k') | extensions/browser/app_window/app_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698