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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 SetBrowserAccessibilityManager( | 530 SetBrowserAccessibilityManager( |
531 BrowserAccessibilityManager::CreateEmptyDocument( | 531 BrowserAccessibilityManager::CreateEmptyDocument( |
532 m_hWnd, busy_state, this)); | 532 m_hWnd, busy_state, this)); |
533 } | 533 } |
534 | 534 |
535 return GetBrowserAccessibilityManager()->GetRoot()-> | 535 return GetBrowserAccessibilityManager()->GetRoot()-> |
536 ToBrowserAccessibilityWin(); | 536 ToBrowserAccessibilityWin(); |
537 } | 537 } |
538 | 538 |
539 void RenderWidgetHostViewWin::MovePluginWindows( | 539 void RenderWidgetHostViewWin::MovePluginWindows( |
540 const gfx::Point& scroll_offset, | 540 const gfx::Vector2d& scroll_offset, |
541 const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { | 541 const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { |
542 MovePluginWindowsHelper(m_hWnd, plugin_window_moves); | 542 MovePluginWindowsHelper(m_hWnd, plugin_window_moves); |
543 } | 543 } |
544 | 544 |
545 static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) { | 545 static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) { |
546 std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam); | 546 std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam); |
547 vector->push_back(hwnd); | 547 vector->push_back(hwnd); |
548 return TRUE; | 548 return TRUE; |
549 } | 549 } |
550 | 550 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 // have animations or fairly expensive layout (e.g., google maps). | 706 // have animations or fairly expensive layout (e.g., google maps). |
707 // | 707 // |
708 // We paint this window synchronously, however child windows (i.e. plugins) | 708 // We paint this window synchronously, however child windows (i.e. plugins) |
709 // are painted asynchronously. By avoiding synchronous cross-process window | 709 // are painted asynchronously. By avoiding synchronous cross-process window |
710 // message dispatching we allow scrolling to be smooth, and also avoid the | 710 // message dispatching we allow scrolling to be smooth, and also avoid the |
711 // browser process locking up if the plugin process is hung. | 711 // browser process locking up if the plugin process is hung. |
712 // | 712 // |
713 RedrawWindow(NULL, damage_region, RDW_UPDATENOW | RDW_NOCHILDREN); | 713 RedrawWindow(NULL, damage_region, RDW_UPDATENOW | RDW_NOCHILDREN); |
714 | 714 |
715 // Send the invalid rect in screen coordinates. | 715 // Send the invalid rect in screen coordinates. |
716 gfx::Rect screen_rect = GetViewBounds(); | |
717 gfx::Rect invalid_screen_rect(damage_bounds); | 716 gfx::Rect invalid_screen_rect(damage_bounds); |
718 invalid_screen_rect.Offset(screen_rect.x(), screen_rect.y()); | 717 invalid_screen_rect.Offset(GetViewBounds().OffsetFromOrigin()); |
719 | 718 |
720 PaintPluginWindowsHelper(m_hWnd, invalid_screen_rect); | 719 PaintPluginWindowsHelper(m_hWnd, invalid_screen_rect); |
721 } | 720 } |
722 | 721 |
723 void RenderWidgetHostViewWin::DidUpdateBackingStore( | 722 void RenderWidgetHostViewWin::DidUpdateBackingStore( |
724 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 723 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
725 const std::vector<gfx::Rect>& copy_rects) { | 724 const std::vector<gfx::Rect>& copy_rects) { |
726 if (is_hidden_) | 725 if (is_hidden_) |
727 return; | 726 return; |
728 | 727 |
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3014 // receive a focus change in the context of a pointer down message, it means | 3013 // receive a focus change in the context of a pointer down message, it means |
3015 // that the pointer down message occurred on the edit field and we should | 3014 // that the pointer down message occurred on the edit field and we should |
3016 // display the on screen keyboard | 3015 // display the on screen keyboard |
3017 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3016 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3018 DisplayOnScreenKeyboardIfNeeded(); | 3017 DisplayOnScreenKeyboardIfNeeded(); |
3019 received_focus_change_after_pointer_down_ = false; | 3018 received_focus_change_after_pointer_down_ = false; |
3020 pointer_down_context_ = false; | 3019 pointer_down_context_ = false; |
3021 } | 3020 } |
3022 | 3021 |
3023 } // namespace content | 3022 } // namespace content |
OLD | NEW |