OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/api/app_current_window_internal/app_current_
window_internal_api.h" | 5 #include "chrome/browser/extensions/api/app_current_window_internal/app_current_
window_internal_api.h" |
6 | 6 |
7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
9 #include "apps/size_constraints.h" | 9 #include "apps/size_constraints.h" |
10 #include "apps/ui/native_app_window.h" | 10 #include "apps/ui/native_app_window.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace app_current_window_internal = | 21 namespace app_current_window_internal = |
22 extensions::api::app_current_window_internal; | 22 extensions::api::app_current_window_internal; |
23 | 23 |
24 namespace Show = app_current_window_internal::Show; | 24 namespace Show = app_current_window_internal::Show; |
25 namespace SetBounds = app_current_window_internal::SetBounds; | 25 namespace SetBounds = app_current_window_internal::SetBounds; |
26 namespace SetSizeConstraints = app_current_window_internal::SetSizeConstraints; | 26 namespace SetSizeConstraints = app_current_window_internal::SetSizeConstraints; |
27 namespace SetIcon = app_current_window_internal::SetIcon; | 27 namespace SetIcon = app_current_window_internal::SetIcon; |
28 namespace SetBadgeIcon = app_current_window_internal::SetBadgeIcon; | 28 namespace SetBadgeIcon = app_current_window_internal::SetBadgeIcon; |
29 namespace SetShape = app_current_window_internal::SetShape; | 29 namespace SetShape = app_current_window_internal::SetShape; |
30 namespace SetAlwaysOnTop = app_current_window_internal::SetAlwaysOnTop; | 30 namespace SetAlwaysOnTop = app_current_window_internal::SetAlwaysOnTop; |
| 31 namespace SetVisibleOnAllWorkspaces = |
| 32 app_current_window_internal::SetVisibleOnAllWorkspaces; |
31 | 33 |
32 using apps::AppWindow; | 34 using apps::AppWindow; |
33 using app_current_window_internal::Bounds; | 35 using app_current_window_internal::Bounds; |
34 using app_current_window_internal::Region; | 36 using app_current_window_internal::Region; |
35 using app_current_window_internal::RegionRect; | 37 using app_current_window_internal::RegionRect; |
36 using app_current_window_internal::SizeConstraints; | 38 using app_current_window_internal::SizeConstraints; |
37 | 39 |
38 namespace extensions { | 40 namespace extensions { |
39 | 41 |
40 namespace { | 42 namespace { |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 return false; | 394 return false; |
393 } | 395 } |
394 | 396 |
395 scoped_ptr<SetAlwaysOnTop::Params> params( | 397 scoped_ptr<SetAlwaysOnTop::Params> params( |
396 SetAlwaysOnTop::Params::Create(*args_)); | 398 SetAlwaysOnTop::Params::Create(*args_)); |
397 CHECK(params.get()); | 399 CHECK(params.get()); |
398 window->SetAlwaysOnTop(params->always_on_top); | 400 window->SetAlwaysOnTop(params->always_on_top); |
399 return true; | 401 return true; |
400 } | 402 } |
401 | 403 |
| 404 bool AppCurrentWindowInternalSetVisibleOnAllWorkspacesFunction::RunWithWindow( |
| 405 AppWindow* window) { |
| 406 if (GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV) { |
| 407 error_ = kDevChannelOnly; |
| 408 return false; |
| 409 } |
| 410 |
| 411 scoped_ptr<SetVisibleOnAllWorkspaces::Params> params( |
| 412 SetVisibleOnAllWorkspaces::Params::Create(*args_)); |
| 413 CHECK(params.get()); |
| 414 window->GetBaseWindow()->SetVisibleOnAllWorkspaces(params->always_visible); |
| 415 return true; |
| 416 } |
| 417 |
402 } // namespace extensions | 418 } // namespace extensions |
OLD | NEW |