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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 if (app_window()->window_type_is_panel()) | 336 if (app_window()->window_type_is_panel()) |
337 return; | 337 return; |
338 | 338 |
339 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); | 339 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); |
340 } | 340 } |
341 | 341 |
342 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { | 342 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { |
343 return widget()->IsFullscreen(); | 343 return widget()->IsFullscreen(); |
344 } | 344 } |
345 | 345 |
346 void ChromeNativeAppWindowViews::UpdateShape(scoped_ptr<SkRegion> region) { | 346 void ChromeNativeAppWindowViews::UpdateShape(std::unique_ptr<SkRegion> region) { |
347 shape_ = std::move(region); | 347 shape_ = std::move(region); |
348 widget()->SetShape(shape() ? new SkRegion(*shape()) : nullptr); | 348 widget()->SetShape(shape() ? new SkRegion(*shape()) : nullptr); |
349 widget()->OnSizeConstraintsChanged(); | 349 widget()->OnSizeConstraintsChanged(); |
350 } | 350 } |
351 | 351 |
352 bool ChromeNativeAppWindowViews::HasFrameColor() const { | 352 bool ChromeNativeAppWindowViews::HasFrameColor() const { |
353 return has_frame_color_; | 353 return has_frame_color_; |
354 } | 354 } |
355 | 355 |
356 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { | 356 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { |
(...skipping 18 matching lines...) Expand all Loading... |
375 InitializePanelWindow(create_params); | 375 InitializePanelWindow(create_params); |
376 } else { | 376 } else { |
377 InitializeDefaultWindow(create_params); | 377 InitializeDefaultWindow(create_params); |
378 } | 378 } |
379 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 379 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
380 Profile::FromBrowserContext(app_window->browser_context()), | 380 Profile::FromBrowserContext(app_window->browser_context()), |
381 widget()->GetFocusManager(), | 381 widget()->GetFocusManager(), |
382 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 382 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
383 NULL)); | 383 NULL)); |
384 } | 384 } |
OLD | NEW |