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

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, 9 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/browser/service_worker/service_worker_context_wrapper.h" 56 #include "content/browser/service_worker/service_worker_context_wrapper.h"
56 #include "content/common/content_constants_internal.h" 57 #include "content/common/content_constants_internal.h"
57 #include "content/common/content_switches_internal.h" 58 #include "content/common/content_switches_internal.h"
58 #include "content/common/cursors/webcursor.h" 59 #include "content/common/cursors/webcursor.h"
59 #include "content/common/drag_messages.h" 60 #include "content/common/drag_messages.h"
60 #include "content/common/frame_messages.h" 61 #include "content/common/frame_messages.h"
61 #include "content/common/host_shared_bitmap_manager.h"
62 #include "content/common/input_messages.h" 62 #include "content/common/input_messages.h"
63 #include "content/common/resize_params.h" 63 #include "content/common/resize_params.h"
64 #include "content/common/text_input_state.h" 64 #include "content/common/text_input_state.h"
65 #include "content/common/view_messages.h" 65 #include "content/common/view_messages.h"
66 #include "content/public/browser/browser_context.h" 66 #include "content/public/browser/browser_context.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"
71 #include "content/public/browser/storage_partition.h" 71 #include "content/public/browser/storage_partition.h"
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 } 2040 }
2041 2041
2042 void RenderWidgetHostImpl::OnShowDisambiguationPopup( 2042 void RenderWidgetHostImpl::OnShowDisambiguationPopup(
2043 const gfx::Rect& rect_pixels, 2043 const gfx::Rect& rect_pixels,
2044 const gfx::Size& size, 2044 const gfx::Size& size,
2045 const cc::SharedBitmapId& id) { 2045 const cc::SharedBitmapId& id) {
2046 DCHECK(!rect_pixels.IsEmpty()); 2046 DCHECK(!rect_pixels.IsEmpty());
2047 DCHECK(!size.IsEmpty()); 2047 DCHECK(!size.IsEmpty());
2048 2048
2049 std::unique_ptr<cc::SharedBitmap> bitmap = 2049 std::unique_ptr<cc::SharedBitmap> bitmap =
2050 HostSharedBitmapManager::current()->GetSharedBitmapFromId(size, id); 2050 display_compositor::HostSharedBitmapManager::current()
2051 ->GetSharedBitmapFromId(size, id);
2051 if (!bitmap) { 2052 if (!bitmap) {
2052 bad_message::ReceivedBadMessage(GetProcess(), 2053 bad_message::ReceivedBadMessage(GetProcess(),
2053 bad_message::RWH_SHARED_BITMAP); 2054 bad_message::RWH_SHARED_BITMAP);
2054 return; 2055 return;
2055 } 2056 }
2056 2057
2057 DCHECK(bitmap->pixels()); 2058 DCHECK(bitmap->pixels());
2058 2059
2059 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); 2060 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
2060 SkBitmap zoomed_bitmap; 2061 SkBitmap zoomed_bitmap;
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 // different from the receiver's. 2531 // different from the receiver's.
2531 file_system_file.url = 2532 file_system_file.url =
2532 GURL(storage::GetIsolatedFileSystemRootURIString( 2533 GURL(storage::GetIsolatedFileSystemRootURIString(
2533 file_system_url.origin(), filesystem_id, std::string()) 2534 file_system_url.origin(), filesystem_id, std::string())
2534 .append(register_name)); 2535 .append(register_name));
2535 file_system_file.filesystem_id = filesystem_id; 2536 file_system_file.filesystem_id = filesystem_id;
2536 } 2537 }
2537 } 2538 }
2538 2539
2539 } // namespace content 2540 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698