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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { | 567 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { |
568 return shape_ != NULL; | 568 return shape_ != NULL; |
569 } | 569 } |
570 | 570 |
571 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { | 571 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { |
572 shape_->getBoundaryPath(mask); | 572 shape_->getBoundaryPath(mask); |
573 } | 573 } |
574 | 574 |
575 // views::View implementation. | 575 // views::View implementation. |
576 | 576 |
577 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() { | 577 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() const { |
578 if (!preferred_size_.IsEmpty()) | 578 if (!preferred_size_.IsEmpty()) |
579 return preferred_size_; | 579 return preferred_size_; |
580 return NativeAppWindowViews::GetPreferredSize(); | 580 return NativeAppWindowViews::GetPreferredSize(); |
581 } | 581 } |
582 | 582 |
583 bool ChromeNativeAppWindowViews::AcceleratorPressed( | 583 bool ChromeNativeAppWindowViews::AcceleratorPressed( |
584 const ui::Accelerator& accelerator) { | 584 const ui::Accelerator& accelerator) { |
585 const std::map<ui::Accelerator, int>& accelerator_table = | 585 const std::map<ui::Accelerator, int>& accelerator_table = |
586 GetAcceleratorTable(); | 586 GetAcceleratorTable(); |
587 std::map<ui::Accelerator, int>::const_iterator iter = | 587 std::map<ui::Accelerator, int>::const_iterator iter = |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 InitializePanelWindow(create_params); | 718 InitializePanelWindow(create_params); |
719 } else { | 719 } else { |
720 InitializeDefaultWindow(create_params); | 720 InitializeDefaultWindow(create_params); |
721 } | 721 } |
722 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 722 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
723 Profile::FromBrowserContext(app_window->browser_context()), | 723 Profile::FromBrowserContext(app_window->browser_context()), |
724 widget()->GetFocusManager(), | 724 widget()->GetFocusManager(), |
725 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 725 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
726 NULL)); | 726 NULL)); |
727 } | 727 } |
OLD | NEW |