| 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 "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { | 560 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { |
| 561 return shape_ != NULL; | 561 return shape_ != NULL; |
| 562 } | 562 } |
| 563 | 563 |
| 564 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { | 564 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { |
| 565 shape_->getBoundaryPath(mask); | 565 shape_->getBoundaryPath(mask); |
| 566 } | 566 } |
| 567 | 567 |
| 568 // views::View implementation. | 568 // views::View implementation. |
| 569 | 569 |
| 570 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() { | 570 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() const { |
| 571 if (!preferred_size_.IsEmpty()) | 571 if (!preferred_size_.IsEmpty()) |
| 572 return preferred_size_; | 572 return preferred_size_; |
| 573 return NativeAppWindowViews::GetPreferredSize(); | 573 return NativeAppWindowViews::GetPreferredSize(); |
| 574 } | 574 } |
| 575 | 575 |
| 576 bool ChromeNativeAppWindowViews::AcceleratorPressed( | 576 bool ChromeNativeAppWindowViews::AcceleratorPressed( |
| 577 const ui::Accelerator& accelerator) { | 577 const ui::Accelerator& accelerator) { |
| 578 const std::map<ui::Accelerator, int>& accelerator_table = | 578 const std::map<ui::Accelerator, int>& accelerator_table = |
| 579 GetAcceleratorTable(); | 579 GetAcceleratorTable(); |
| 580 std::map<ui::Accelerator, int>::const_iterator iter = | 580 std::map<ui::Accelerator, int>::const_iterator iter = |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 InitializePanelWindow(create_params); | 712 InitializePanelWindow(create_params); |
| 713 } else { | 713 } else { |
| 714 InitializeDefaultWindow(create_params); | 714 InitializeDefaultWindow(create_params); |
| 715 } | 715 } |
| 716 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 716 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
| 717 Profile::FromBrowserContext(app_window->browser_context()), | 717 Profile::FromBrowserContext(app_window->browser_context()), |
| 718 widget()->GetFocusManager(), | 718 widget()->GetFocusManager(), |
| 719 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 719 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 720 NULL)); | 720 NULL)); |
| 721 } | 721 } |
| OLD | NEW |