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

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: Initialize AppWindow::CreateParams::visible_on_all_workspaces. Created 6 years, 3 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 28ffe4e39261170bc1f1d533c1412d5c91451e1b..18554f7cba492090c8b714d9b1eeedcdecc52d5c 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
@@ -27,6 +27,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 app_current_window_internal::Bounds;
using app_current_window_internal::Region;
@@ -397,4 +399,18 @@ bool AppCurrentWindowInternalSetAlwaysOnTopFunction::RunWithWindow(
return true;
}
+bool AppCurrentWindowInternalSetVisibleOnAllWorkspacesFunction::RunWithWindow(
+ AppWindow* window) {
+ if (GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV) {
+ 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