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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "base/metrics/histogram_macros.h" | 23 #include "base/metrics/histogram_macros.h" |
24 #include "base/single_thread_task_runner.h" | 24 #include "base/single_thread_task_runner.h" |
25 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
27 #include "base/task_scheduler/post_task.h" | 27 #include "base/task_scheduler/post_task.h" |
28 #include "base/threading/thread_task_runner_handle.h" | 28 #include "base/threading/thread_task_runner_handle.h" |
29 #include "base/trace_event/trace_event.h" | 29 #include "base/trace_event/trace_event.h" |
30 #include "build/build_config.h" | 30 #include "build/build_config.h" |
31 #include "cc/base/switches.h" | 31 #include "cc/base/switches.h" |
32 #include "cc/output/compositor_frame.h" | 32 #include "cc/output/compositor_frame.h" |
| 33 #include "components/display_compositor/host_shared_bitmap_manager.h" |
33 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 34 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
34 #include "content/browser/bad_message.h" | 35 #include "content/browser/bad_message.h" |
35 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 36 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
36 #include "content/browser/child_process_security_policy_impl.h" | 37 #include "content/browser/child_process_security_policy_impl.h" |
37 #include "content/browser/gpu/compositor_util.h" | 38 #include "content/browser/gpu/compositor_util.h" |
38 #include "content/browser/renderer_host/dip_util.h" | 39 #include "content/browser/renderer_host/dip_util.h" |
39 #include "content/browser/renderer_host/frame_metadata_util.h" | 40 #include "content/browser/renderer_host/frame_metadata_util.h" |
40 #include "content/browser/renderer_host/input/input_router_config_helper.h" | 41 #include "content/browser/renderer_host/input/input_router_config_helper.h" |
41 #include "content/browser/renderer_host/input/input_router_impl.h" | 42 #include "content/browser/renderer_host/input/input_router_impl.h" |
42 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 43 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
43 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" | 44 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" |
44 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 45 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
45 #include "content/browser/renderer_host/input/timeout_monitor.h" | 46 #include "content/browser/renderer_host/input/timeout_monitor.h" |
46 #include "content/browser/renderer_host/input/touch_emulator.h" | 47 #include "content/browser/renderer_host/input/touch_emulator.h" |
47 #include "content/browser/renderer_host/render_process_host_impl.h" | 48 #include "content/browser/renderer_host/render_process_host_impl.h" |
48 #include "content/browser/renderer_host/render_view_host_delegate.h" | 49 #include "content/browser/renderer_host/render_view_host_delegate.h" |
49 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
50 #include "content/browser/renderer_host/render_view_host_impl.h" | 51 #include "content/browser/renderer_host/render_view_host_impl.h" |
51 #include "content/browser/renderer_host/render_widget_helper.h" | 52 #include "content/browser/renderer_host/render_widget_helper.h" |
52 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 53 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
53 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" | 54 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" |
54 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 55 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
55 #include "content/common/content_constants_internal.h" | 56 #include "content/common/content_constants_internal.h" |
56 #include "content/common/content_switches_internal.h" | 57 #include "content/common/content_switches_internal.h" |
57 #include "content/common/cursors/webcursor.h" | 58 #include "content/common/cursors/webcursor.h" |
58 #include "content/common/drag_messages.h" | 59 #include "content/common/drag_messages.h" |
59 #include "content/common/frame_messages.h" | 60 #include "content/common/frame_messages.h" |
60 #include "content/common/host_shared_bitmap_manager.h" | |
61 #include "content/common/input_messages.h" | 61 #include "content/common/input_messages.h" |
62 #include "content/common/resize_params.h" | 62 #include "content/common/resize_params.h" |
63 #include "content/common/text_input_state.h" | 63 #include "content/common/text_input_state.h" |
64 #include "content/common/view_messages.h" | 64 #include "content/common/view_messages.h" |
65 #include "content/public/browser/browser_context.h" | 65 #include "content/public/browser/browser_context.h" |
66 #include "content/public/browser/keyboard_event_processing_result.h" | 66 #include "content/public/browser/keyboard_event_processing_result.h" |
67 #include "content/public/browser/native_web_keyboard_event.h" | 67 #include "content/public/browser/native_web_keyboard_event.h" |
68 #include "content/public/browser/notification_service.h" | 68 #include "content/public/browser/notification_service.h" |
69 #include "content/public/browser/notification_types.h" | 69 #include "content/public/browser/notification_types.h" |
70 #include "content/public/browser/render_widget_host_iterator.h" | 70 #include "content/public/browser/render_widget_host_iterator.h" |
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 } | 2078 } |
2079 | 2079 |
2080 void RenderWidgetHostImpl::OnShowDisambiguationPopup( | 2080 void RenderWidgetHostImpl::OnShowDisambiguationPopup( |
2081 const gfx::Rect& rect_pixels, | 2081 const gfx::Rect& rect_pixels, |
2082 const gfx::Size& size, | 2082 const gfx::Size& size, |
2083 const cc::SharedBitmapId& id) { | 2083 const cc::SharedBitmapId& id) { |
2084 DCHECK(!rect_pixels.IsEmpty()); | 2084 DCHECK(!rect_pixels.IsEmpty()); |
2085 DCHECK(!size.IsEmpty()); | 2085 DCHECK(!size.IsEmpty()); |
2086 | 2086 |
2087 std::unique_ptr<cc::SharedBitmap> bitmap = | 2087 std::unique_ptr<cc::SharedBitmap> bitmap = |
2088 HostSharedBitmapManager::current()->GetSharedBitmapFromId(size, id); | 2088 display_compositor::HostSharedBitmapManager::current() |
| 2089 ->GetSharedBitmapFromId(size, id); |
2089 if (!bitmap) { | 2090 if (!bitmap) { |
2090 bad_message::ReceivedBadMessage(GetProcess(), | 2091 bad_message::ReceivedBadMessage(GetProcess(), |
2091 bad_message::RWH_SHARED_BITMAP); | 2092 bad_message::RWH_SHARED_BITMAP); |
2092 return; | 2093 return; |
2093 } | 2094 } |
2094 | 2095 |
2095 DCHECK(bitmap->pixels()); | 2096 DCHECK(bitmap->pixels()); |
2096 | 2097 |
2097 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); | 2098 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); |
2098 SkBitmap zoomed_bitmap; | 2099 SkBitmap zoomed_bitmap; |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 | 2657 |
2657 // After navigation, if a frame belonging to the new page is received, stop | 2658 // After navigation, if a frame belonging to the new page is received, stop |
2658 // the timer that triggers clearing the graphics of the last page. | 2659 // the timer that triggers clearing the graphics of the last page. |
2659 if (last_received_content_source_id_ >= current_content_source_id_ && | 2660 if (last_received_content_source_id_ >= current_content_source_id_ && |
2660 new_content_rendering_timeout_->IsRunning()) { | 2661 new_content_rendering_timeout_->IsRunning()) { |
2661 new_content_rendering_timeout_->Stop(); | 2662 new_content_rendering_timeout_->Stop(); |
2662 } | 2663 } |
2663 } | 2664 } |
2664 | 2665 |
2665 } // namespace content | 2666 } // namespace content |
OLD | NEW |