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

Unified Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 26427002: Add always-on-top property to app windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 7 years, 2 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/extensions/api/app_window/app_window_api.cc
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc
index b3bbeb95cdb776889ca6b5d986dbca7044ffaaaf..34ab489e6db4f515c4f91d9b45593606a1fe2b75 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -93,6 +93,7 @@ void SetCreateResultFromShellWindow(ShellWindow* window,
result->SetBoolean("fullscreen", window->GetBaseWindow()->IsFullscreen());
result->SetBoolean("minimized", window->GetBaseWindow()->IsMinimized());
result->SetBoolean("maximized", window->GetBaseWindow()->IsMaximized());
+ result->SetBoolean("alwaysOnTop", window->GetBaseWindow()->IsAlwaysOnTop());
base::DictionaryValue* boundsValue = new base::DictionaryValue();
gfx::Rect bounds = window->GetClientBounds();
boundsValue->SetInteger("left", bounds.x());
@@ -246,6 +247,11 @@ bool AppWindowCreateFunction::RunImpl() {
if (options->resizable.get())
create_params.resizable = *options->resizable.get();
+ if (GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV &&
+ options->always_on_top.get()) {
+ create_params.always_on_top = *options->always_on_top.get();
+ }
+
if (options->type != extensions::api::app_window::WINDOW_TYPE_PANEL) {
switch (options->state) {
case extensions::api::app_window::STATE_NONE:

Powered by Google App Engine
This is Rietveld 408576698