OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/shell_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 631 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
632 OnViewWasResized(); | 632 OnViewWasResized(); |
633 } | 633 } |
634 | 634 |
635 void ShellWindowViews::HandleKeyboardEvent( | 635 void ShellWindowViews::HandleKeyboardEvent( |
636 const content::NativeWebKeyboardEvent& event) { | 636 const content::NativeWebKeyboardEvent& event) { |
637 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 637 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
638 GetFocusManager()); | 638 GetFocusManager()); |
639 } | 639 } |
640 | 640 |
| 641 void ShellWindowViews::RenderViewHostChanged() { |
| 642 OnViewWasResized(); |
| 643 } |
| 644 |
641 void ShellWindowViews::SaveWindowPlacement(const gfx::Rect& bounds, | 645 void ShellWindowViews::SaveWindowPlacement(const gfx::Rect& bounds, |
642 ui::WindowShowState show_state) { | 646 ui::WindowShowState show_state) { |
643 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 647 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
644 shell_window_->SaveWindowPosition(); | 648 shell_window_->SaveWindowPosition(); |
645 } | 649 } |
646 | 650 |
647 // static | 651 // static |
648 NativeShellWindow* NativeShellWindow::Create( | 652 NativeShellWindow* NativeShellWindow::Create( |
649 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 653 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
650 return new ShellWindowViews(shell_window, params); | 654 return new ShellWindowViews(shell_window, params); |
651 } | 655 } |
OLD | NEW |