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

Unified Diff: chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc

Issue 469993003: Add AppWindow.setVisibleOnAllWorkspaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 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
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 cb95fd3825616e72cf1d08259ffd5bd7d00cc0be..be63f18434d0427900bc0b072e86649d7adc158c 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
@@ -28,6 +28,8 @@ namespace SetIcon = app_current_window_internal::SetIcon;
namespace SetBadgeIcon = app_current_window_internal::SetBadgeIcon;
namespace SetShape = app_current_window_internal::SetShape;
namespace SetAlwaysOnTop = app_current_window_internal::SetAlwaysOnTop;
+namespace SetVisibleOnAllWorkspaces =
+ app_current_window_internal::SetVisibleOnAllWorkspaces;
using apps::AppWindow;
using app_current_window_internal::Bounds;
@@ -400,4 +402,18 @@ bool AppCurrentWindowInternalSetAlwaysOnTopFunction::RunWithWindow(
return true;
}
+bool AppCurrentWindowInternalSetVisibleOnAllWorkspacesFunction::RunWithWindow(
+ AppWindow* window) {
+ if (GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV) {
benwells 2014/08/20 05:02:08 Can we use the feature system to enforce this?
jackhou1 2014/08/27 05:10:45 We can for chrome.app.window.canSetVisibleOnAllWor
+ error_ = kDevChannelOnly;
+ return false;
+ }
+
+ scoped_ptr<SetVisibleOnAllWorkspaces::Params> params(
+ SetVisibleOnAllWorkspaces::Params::Create(*args_));
+ CHECK(params.get());
+ window->GetBaseWindow()->SetVisibleOnAllWorkspaces(params->always_visible);
+ return true;
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698