| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/views/apps/chrome_native_app_window_views.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "apps/ui/views/app_window_frame_view.h" | 10 #include "apps/ui/views/app_window_frame_view.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); | 348 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); |
| 349 } | 349 } |
| 350 | 350 |
| 351 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { | 351 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { |
| 352 return widget()->IsFullscreen(); | 352 return widget()->IsFullscreen(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void ChromeNativeAppWindowViews::UpdateShape(std::unique_ptr<SkRegion> region) { | 355 void ChromeNativeAppWindowViews::UpdateShape(std::unique_ptr<SkRegion> region) { |
| 356 shape_ = std::move(region); | 356 shape_ = std::move(region); |
| 357 widget()->SetShape(shape() ? new SkRegion(*shape()) : nullptr); | 357 widget()->SetShape(shape() ? base::MakeUnique<SkRegion>(*shape()) : nullptr); |
| 358 widget()->OnSizeConstraintsChanged(); | 358 widget()->OnSizeConstraintsChanged(); |
| 359 } | 359 } |
| 360 | 360 |
| 361 bool ChromeNativeAppWindowViews::HasFrameColor() const { | 361 bool ChromeNativeAppWindowViews::HasFrameColor() const { |
| 362 return has_frame_color_; | 362 return has_frame_color_; |
| 363 } | 363 } |
| 364 | 364 |
| 365 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { | 365 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { |
| 366 return active_frame_color_; | 366 return active_frame_color_; |
| 367 } | 367 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 384 InitializePanelWindow(create_params); | 384 InitializePanelWindow(create_params); |
| 385 } else { | 385 } else { |
| 386 InitializeDefaultWindow(create_params); | 386 InitializeDefaultWindow(create_params); |
| 387 } | 387 } |
| 388 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 388 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
| 389 Profile::FromBrowserContext(app_window->browser_context()), | 389 Profile::FromBrowserContext(app_window->browser_context()), |
| 390 widget()->GetFocusManager(), | 390 widget()->GetFocusManager(), |
| 391 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 391 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 392 NULL)); | 392 NULL)); |
| 393 } | 393 } |
| OLD | NEW |