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

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

Issue 1811523002: Enhance chrome.app.window API with better shelf integration Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [WIP] Rebase + browser tests. Added a new map that holds all the showInShelf windows. Created 4 years, 8 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 e41575dae1a383defc1ffb3041ad6ba1621543f5..b69197734a7324e5fc1214bfdbb57f64cbfd8e50 100644
--- a/extensions/browser/app_window/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -191,6 +191,10 @@ class AppWindow : public content::WebContentsDelegate,
// If true, the window will be visible on all workspaces. Defaults to false.
bool visible_on_all_workspaces;
+ // If true, the window will be tied to its own icon in the shelf instead of
+ // being folded in the menu of the parent app. Defaults to false.
+ bool show_in_shelf;
+
// 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;
@@ -368,6 +372,9 @@ class AppWindow : public content::WebContentsDelegate,
// remove this TODO.
bool is_ime_window() const { return is_ime_window_; }
+ // Whether the app window will create its own icon in the shelf.
+ bool show_in_shelf() const { return show_in_shelf_; }
+
void SetAppWindowContentsForTesting(scoped_ptr<AppWindowContents> contents) {
app_window_contents_ = std::move(contents);
}
@@ -566,6 +573,9 @@ class AppWindow : public content::WebContentsDelegate,
// Whether |is_ime_window| was set in the CreateParams.
bool is_ime_window_;
+ // Whether |show_in_shelf| was set in the CreateParams.
+ bool show_in_shelf_;
+
// 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