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 "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
10 #include <stack> | 10 #include <stack> |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 SetBrowserAccessibilityManager( | 630 SetBrowserAccessibilityManager( |
631 BrowserAccessibilityManager::CreateEmptyDocument( | 631 BrowserAccessibilityManager::CreateEmptyDocument( |
632 m_hWnd, busy_state, this)); | 632 m_hWnd, busy_state, this)); |
633 } | 633 } |
634 | 634 |
635 return GetBrowserAccessibilityManager()->GetRoot()-> | 635 return GetBrowserAccessibilityManager()->GetRoot()-> |
636 ToBrowserAccessibilityWin(); | 636 ToBrowserAccessibilityWin(); |
637 } | 637 } |
638 | 638 |
639 void RenderWidgetHostViewWin::MovePluginWindows( | 639 void RenderWidgetHostViewWin::MovePluginWindows( |
640 const gfx::Point& scroll_offset, | 640 const gfx::Vector2d& scroll_offset, |
641 const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { | 641 const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { |
642 MovePluginWindowsHelper(m_hWnd, plugin_window_moves); | 642 MovePluginWindowsHelper(m_hWnd, plugin_window_moves); |
643 } | 643 } |
644 | 644 |
645 static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) { | 645 static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) { |
646 std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam); | 646 std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam); |
647 vector->push_back(hwnd); | 647 vector->push_back(hwnd); |
648 return TRUE; | 648 return TRUE; |
649 } | 649 } |
650 | 650 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 // have animations or fairly expensive layout (e.g., google maps). | 807 // have animations or fairly expensive layout (e.g., google maps). |
808 // | 808 // |
809 // We paint this window synchronously, however child windows (i.e. plugins) | 809 // We paint this window synchronously, however child windows (i.e. plugins) |
810 // are painted asynchronously. By avoiding synchronous cross-process window | 810 // are painted asynchronously. By avoiding synchronous cross-process window |
811 // message dispatching we allow scrolling to be smooth, and also avoid the | 811 // message dispatching we allow scrolling to be smooth, and also avoid the |
812 // browser process locking up if the plugin process is hung. | 812 // browser process locking up if the plugin process is hung. |
813 // | 813 // |
814 RedrawWindow(NULL, damage_region, RDW_UPDATENOW | RDW_NOCHILDREN); | 814 RedrawWindow(NULL, damage_region, RDW_UPDATENOW | RDW_NOCHILDREN); |
815 | 815 |
816 // Send the invalid rect in screen coordinates. | 816 // Send the invalid rect in screen coordinates. |
817 gfx::Rect screen_rect = GetViewBounds(); | |
818 gfx::Rect invalid_screen_rect(damage_bounds); | 817 gfx::Rect invalid_screen_rect(damage_bounds); |
819 invalid_screen_rect.Offset(screen_rect.x(), screen_rect.y()); | 818 invalid_screen_rect.Offset(GetViewBounds().OffsetFromOrigin()); |
820 | 819 |
821 PaintPluginWindowsHelper(m_hWnd, invalid_screen_rect); | 820 PaintPluginWindowsHelper(m_hWnd, invalid_screen_rect); |
822 } | 821 } |
823 | 822 |
824 void RenderWidgetHostViewWin::DidUpdateBackingStore( | 823 void RenderWidgetHostViewWin::DidUpdateBackingStore( |
825 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 824 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
826 const std::vector<gfx::Rect>& copy_rects) { | 825 const std::vector<gfx::Rect>& copy_rects) { |
827 if (is_hidden_) | 826 if (is_hidden_) |
828 return; | 827 return; |
829 | 828 |
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3115 // receive a focus change in the context of a pointer down message, it means | 3114 // receive a focus change in the context of a pointer down message, it means |
3116 // that the pointer down message occurred on the edit field and we should | 3115 // that the pointer down message occurred on the edit field and we should |
3117 // display the on screen keyboard | 3116 // display the on screen keyboard |
3118 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3117 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3119 DisplayOnScreenKeyboardIfNeeded(); | 3118 DisplayOnScreenKeyboardIfNeeded(); |
3120 received_focus_change_after_pointer_down_ = false; | 3119 received_focus_change_after_pointer_down_ = false; |
3121 pointer_down_context_ = false; | 3120 pointer_down_context_ = false; |
3122 } | 3121 } |
3123 | 3122 |
3124 } // namespace content | 3123 } // namespace content |
OLD | NEW |