| 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 "extensions/browser/api/app_current_window_internal/app_current_window_
internal_api.h" | 5 #include "extensions/browser/api/app_current_window_internal/app_current_window_
internal_api.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "extensions/browser/app_window/app_window.h" | 8 #include "extensions/browser/app_window/app_window.h" |
| 9 #include "extensions/browser/app_window/app_window_client.h" | 9 #include "extensions/browser/app_window/app_window_client.h" |
| 10 #include "extensions/browser/app_window/app_window_registry.h" | 10 #include "extensions/browser/app_window/app_window_registry.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 const RegionRect& inputRect = **i; | 368 const RegionRect& inputRect = **i; |
| 369 int32_t x = inputRect.left; | 369 int32_t x = inputRect.left; |
| 370 int32_t y = inputRect.top; | 370 int32_t y = inputRect.top; |
| 371 int32_t width = inputRect.width; | 371 int32_t width = inputRect.width; |
| 372 int32_t height = inputRect.height; | 372 int32_t height = inputRect.height; |
| 373 | 373 |
| 374 SkIRect rect = SkIRect::MakeXYWH(x, y, width, height); | 374 SkIRect rect = SkIRect::MakeXYWH(x, y, width, height); |
| 375 region->op(rect, SkRegion::kUnion_Op); | 375 region->op(rect, SkRegion::kUnion_Op); |
| 376 } | 376 } |
| 377 } else { | 377 } else { |
| 378 region.reset(NULL); | 378 region.reset(nullptr); |
| 379 } | 379 } |
| 380 | 380 |
| 381 window->UpdateShape(region.Pass()); | 381 window->UpdateShape(region.Pass()); |
| 382 | 382 |
| 383 return true; | 383 return true; |
| 384 } | 384 } |
| 385 | 385 |
| 386 bool AppCurrentWindowInternalSetAlwaysOnTopFunction::RunWithWindow( | 386 bool AppCurrentWindowInternalSetAlwaysOnTopFunction::RunWithWindow( |
| 387 AppWindow* window) { | 387 AppWindow* window) { |
| 388 if (!extension()->permissions_data()->HasAPIPermission( | 388 if (!extension()->permissions_data()->HasAPIPermission( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 406 } | 406 } |
| 407 | 407 |
| 408 scoped_ptr<SetVisibleOnAllWorkspaces::Params> params( | 408 scoped_ptr<SetVisibleOnAllWorkspaces::Params> params( |
| 409 SetVisibleOnAllWorkspaces::Params::Create(*args_)); | 409 SetVisibleOnAllWorkspaces::Params::Create(*args_)); |
| 410 CHECK(params.get()); | 410 CHECK(params.get()); |
| 411 window->GetBaseWindow()->SetVisibleOnAllWorkspaces(params->always_visible); | 411 window->GetBaseWindow()->SetVisibleOnAllWorkspaces(params->always_visible); |
| 412 return true; | 412 return true; |
| 413 } | 413 } |
| 414 | 414 |
| 415 } // namespace extensions | 415 } // namespace extensions |
| OLD | NEW |