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 | 9 |
9 #include "apps/ui/views/app_window_frame_view.h" | 10 #include "apps/ui/views/app_window_frame_view.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
13 #include "chrome/browser/app_mode/app_mode_utils.h" | 14 #include "chrome/browser/app_mode/app_mode_utils.h" |
14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views
.h" | 16 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views
.h" |
16 #include "chrome/browser/ui/views/frame/taskbar_decorator.h" | 17 #include "chrome/browser/ui/views/frame/taskbar_decorator.h" |
17 #include "components/favicon/content/content_favicon_driver.h" | 18 #include "components/favicon/content/content_favicon_driver.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 return; | 337 return; |
337 | 338 |
338 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); | 339 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); |
339 } | 340 } |
340 | 341 |
341 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { | 342 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { |
342 return widget()->IsFullscreen(); | 343 return widget()->IsFullscreen(); |
343 } | 344 } |
344 | 345 |
345 void ChromeNativeAppWindowViews::UpdateShape(scoped_ptr<SkRegion> region) { | 346 void ChromeNativeAppWindowViews::UpdateShape(scoped_ptr<SkRegion> region) { |
346 shape_ = region.Pass(); | 347 shape_ = std::move(region); |
347 widget()->SetShape(shape() ? new SkRegion(*shape()) : nullptr); | 348 widget()->SetShape(shape() ? new SkRegion(*shape()) : nullptr); |
348 widget()->OnSizeConstraintsChanged(); | 349 widget()->OnSizeConstraintsChanged(); |
349 } | 350 } |
350 | 351 |
351 bool ChromeNativeAppWindowViews::HasFrameColor() const { | 352 bool ChromeNativeAppWindowViews::HasFrameColor() const { |
352 return has_frame_color_; | 353 return has_frame_color_; |
353 } | 354 } |
354 | 355 |
355 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { | 356 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { |
356 return active_frame_color_; | 357 return active_frame_color_; |
(...skipping 17 matching lines...) Expand all Loading... |
374 InitializePanelWindow(create_params); | 375 InitializePanelWindow(create_params); |
375 } else { | 376 } else { |
376 InitializeDefaultWindow(create_params); | 377 InitializeDefaultWindow(create_params); |
377 } | 378 } |
378 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 379 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
379 Profile::FromBrowserContext(app_window->browser_context()), | 380 Profile::FromBrowserContext(app_window->browser_context()), |
380 widget()->GetFocusManager(), | 381 widget()->GetFocusManager(), |
381 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 382 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
382 NULL)); | 383 NULL)); |
383 } | 384 } |
OLD | NEW |