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 13 matching lines...) Expand all Loading... |
24 #include "base/metrics/histogram_macros.h" | 24 #include "base/metrics/histogram_macros.h" |
25 #include "base/single_thread_task_runner.h" | 25 #include "base/single_thread_task_runner.h" |
26 #include "base/strings/string_number_conversions.h" | 26 #include "base/strings/string_number_conversions.h" |
27 #include "base/strings/utf_string_conversions.h" | 27 #include "base/strings/utf_string_conversions.h" |
28 #include "base/task_scheduler/post_task.h" | 28 #include "base/task_scheduler/post_task.h" |
29 #include "base/threading/thread_task_runner_handle.h" | 29 #include "base/threading/thread_task_runner_handle.h" |
30 #include "base/trace_event/trace_event.h" | 30 #include "base/trace_event/trace_event.h" |
31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
32 #include "cc/base/switches.h" | 32 #include "cc/base/switches.h" |
33 #include "cc/output/compositor_frame.h" | 33 #include "cc/output/compositor_frame.h" |
34 #include "components/display_compositor/host_shared_bitmap_manager.h" | 34 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" |
35 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 35 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
36 #include "content/browser/bad_message.h" | 36 #include "content/browser/bad_message.h" |
37 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 37 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
38 #include "content/browser/child_process_security_policy_impl.h" | 38 #include "content/browser/child_process_security_policy_impl.h" |
39 #include "content/browser/fileapi/browser_file_system_helper.h" | 39 #include "content/browser/fileapi/browser_file_system_helper.h" |
40 #include "content/browser/gpu/compositor_util.h" | 40 #include "content/browser/gpu/compositor_util.h" |
41 #include "content/browser/renderer_host/dip_util.h" | 41 #include "content/browser/renderer_host/dip_util.h" |
42 #include "content/browser/renderer_host/frame_metadata_util.h" | 42 #include "content/browser/renderer_host/frame_metadata_util.h" |
43 #include "content/browser/renderer_host/input/input_router_config_helper.h" | 43 #include "content/browser/renderer_host/input/input_router_config_helper.h" |
44 #include "content/browser/renderer_host/input/input_router_impl.h" | 44 #include "content/browser/renderer_host/input/input_router_impl.h" |
(...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2103 } | 2103 } |
2104 | 2104 |
2105 void RenderWidgetHostImpl::OnShowDisambiguationPopup( | 2105 void RenderWidgetHostImpl::OnShowDisambiguationPopup( |
2106 const gfx::Rect& rect_pixels, | 2106 const gfx::Rect& rect_pixels, |
2107 const gfx::Size& size, | 2107 const gfx::Size& size, |
2108 const cc::SharedBitmapId& id) { | 2108 const cc::SharedBitmapId& id) { |
2109 DCHECK(!rect_pixels.IsEmpty()); | 2109 DCHECK(!rect_pixels.IsEmpty()); |
2110 DCHECK(!size.IsEmpty()); | 2110 DCHECK(!size.IsEmpty()); |
2111 | 2111 |
2112 std::unique_ptr<cc::SharedBitmap> bitmap = | 2112 std::unique_ptr<cc::SharedBitmap> bitmap = |
2113 display_compositor::HostSharedBitmapManager::current() | 2113 viz::HostSharedBitmapManager::current()->GetSharedBitmapFromId(size, id); |
2114 ->GetSharedBitmapFromId(size, id); | |
2115 if (!bitmap) { | 2114 if (!bitmap) { |
2116 bad_message::ReceivedBadMessage(GetProcess(), | 2115 bad_message::ReceivedBadMessage(GetProcess(), |
2117 bad_message::RWH_SHARED_BITMAP); | 2116 bad_message::RWH_SHARED_BITMAP); |
2118 return; | 2117 return; |
2119 } | 2118 } |
2120 | 2119 |
2121 DCHECK(bitmap->pixels()); | 2120 DCHECK(bitmap->pixels()); |
2122 | 2121 |
2123 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); | 2122 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); |
2124 SkBitmap zoomed_bitmap; | 2123 SkBitmap zoomed_bitmap; |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 RenderProcessHost* rph = GetProcess(); | 2644 RenderProcessHost* rph = GetProcess(); |
2646 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); | 2645 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); |
2647 i != messages.end(); ++i) { | 2646 i != messages.end(); ++i) { |
2648 rph->OnMessageReceived(*i); | 2647 rph->OnMessageReceived(*i); |
2649 if (i->dispatch_error()) | 2648 if (i->dispatch_error()) |
2650 rph->OnBadMessageReceived(*i); | 2649 rph->OnBadMessageReceived(*i); |
2651 } | 2650 } |
2652 } | 2651 } |
2653 | 2652 |
2654 } // namespace content | 2653 } // namespace content |
OLD | NEW |