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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 widget()->SetShape(new SkRegion(*shape_)); | 635 widget()->SetShape(new SkRegion(*shape_)); |
636 if (!had_shape) { | 636 if (!had_shape) { |
637 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>( | 637 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>( |
638 new ShapedAppWindowTargeter(native_window, this))); | 638 new ShapedAppWindowTargeter(native_window, this))); |
639 } | 639 } |
640 } else { | 640 } else { |
641 widget()->SetShape(NULL); | 641 widget()->SetShape(NULL); |
642 if (had_shape) | 642 if (had_shape) |
643 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>()); | 643 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>()); |
644 } | 644 } |
| 645 widget()->OnSizeConstraintsChanged(); |
645 } | 646 } |
646 | 647 |
647 bool ChromeNativeAppWindowViews::HasFrameColor() const { | 648 bool ChromeNativeAppWindowViews::HasFrameColor() const { |
648 return has_frame_color_; | 649 return has_frame_color_; |
649 } | 650 } |
650 | 651 |
651 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { | 652 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { |
652 return active_frame_color_; | 653 return active_frame_color_; |
653 } | 654 } |
654 | 655 |
(...skipping 15 matching lines...) Expand all Loading... |
670 InitializePanelWindow(create_params); | 671 InitializePanelWindow(create_params); |
671 } else { | 672 } else { |
672 InitializeDefaultWindow(create_params); | 673 InitializeDefaultWindow(create_params); |
673 } | 674 } |
674 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 675 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
675 Profile::FromBrowserContext(app_window->browser_context()), | 676 Profile::FromBrowserContext(app_window->browser_context()), |
676 widget()->GetFocusManager(), | 677 widget()->GetFocusManager(), |
677 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 678 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
678 NULL)); | 679 NULL)); |
679 } | 680 } |
OLD | NEW |