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

Unified Diff: chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_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: Cache state of isAlwaysOnTop in widget. Fixed clobber in x11 window init. 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_current_window_internal/app_current_window_internal_api.cc
diff --git a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
index f5cdf91f6ff0cd226e5e9861d5ed23d9eb5d2cb5..7bc26ca56151cd0e0043f69d1d10d886348900d8 100644
--- a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
+++ b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
@@ -20,6 +20,8 @@ namespace SetBounds = extensions::api::app_current_window_internal::SetBounds;
namespace SetIcon = extensions::api::app_current_window_internal::SetIcon;
namespace SetInputRegion =
extensions::api::app_current_window_internal::SetInputRegion;
+namespace SetAlwaysOnTop =
+ extensions::api::app_current_window_internal::SetAlwaysOnTop;
using apps::ShellWindow;
using extensions::api::app_current_window_internal::Bounds;
@@ -202,4 +204,18 @@ bool AppCurrentWindowInternalSetInputRegionFunction::RunWithWindow(
return true;
}
+bool AppCurrentWindowInternalSetAlwaysOnTopFunction::RunWithWindow(
+ ShellWindow* window) {
+ if (GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV) {
benwells 2013/10/09 02:00:50 Can we use _api_features.json for this check?
tmdiep 2013/10/09 06:18:08 Done.
+ error_ = kDevChannelOnly;
+ return false;
+ }
+
+ scoped_ptr<SetAlwaysOnTop::Params> params(
+ SetAlwaysOnTop::Params::Create(*args_));
+ CHECK(params.get());
+ window->GetBaseWindow()->SetAlwaysOnTop(params->always_on_top);
+ return true;
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698