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 |