Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2717213004: Move SharedBitmapManager implementation out of content/ (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 } 2097 }
2098 2098
2099 void RenderWidgetHostImpl::OnShowDisambiguationPopup( 2099 void RenderWidgetHostImpl::OnShowDisambiguationPopup(
2100 const gfx::Rect& rect_pixels, 2100 const gfx::Rect& rect_pixels,
2101 const gfx::Size& size, 2101 const gfx::Size& size,
2102 const cc::SharedBitmapId& id) { 2102 const cc::SharedBitmapId& id) {
2103 DCHECK(!rect_pixels.IsEmpty()); 2103 DCHECK(!rect_pixels.IsEmpty());
2104 DCHECK(!size.IsEmpty()); 2104 DCHECK(!size.IsEmpty());
2105 2105
2106 std::unique_ptr<cc::SharedBitmap> bitmap = 2106 std::unique_ptr<cc::SharedBitmap> bitmap =
2107 HostSharedBitmapManager::current()->GetSharedBitmapFromId(size, id); 2107 display_compositor::HostSharedBitmapManager::current()
2108 ->GetSharedBitmapFromId(size, id);
2108 if (!bitmap) { 2109 if (!bitmap) {
2109 bad_message::ReceivedBadMessage(GetProcess(), 2110 bad_message::ReceivedBadMessage(GetProcess(),
2110 bad_message::RWH_SHARED_BITMAP); 2111 bad_message::RWH_SHARED_BITMAP);
2111 return; 2112 return;
2112 } 2113 }
2113 2114
2114 DCHECK(bitmap->pixels()); 2115 DCHECK(bitmap->pixels());
2115 2116
2116 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); 2117 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
2117 SkBitmap zoomed_bitmap; 2118 SkBitmap zoomed_bitmap;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 RenderProcessHost* rph = GetProcess(); 2714 RenderProcessHost* rph = GetProcess();
2714 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); 2715 for (std::vector<IPC::Message>::const_iterator i = messages.begin();
2715 i != messages.end(); ++i) { 2716 i != messages.end(); ++i) {
2716 rph->OnMessageReceived(*i); 2717 rph->OnMessageReceived(*i);
2717 if (i->dispatch_error()) 2718 if (i->dispatch_error())
2718 rph->OnBadMessageReceived(*i); 2719 rph->OnBadMessageReceived(*i);
2719 } 2720 }
2720 } 2721 }
2721 2722
2722 } // namespace content 2723 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698