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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 2633303003: Clean up RenderWidgetHostView(ChildFrame and Guest) compositing code (Closed)
Patch Set: c Created 3 years, 11 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
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/threading/thread_task_runner_handle.h" 15 #include "base/threading/thread_task_runner_handle.h"
16 #include "cc/surfaces/surface.h" 16 #include "cc/surfaces/surface.h"
17 #include "cc/surfaces/surface_info.h"
17 #include "content/common/browser_plugin/browser_plugin_constants.h" 18 #include "content/common/browser_plugin/browser_plugin_constants.h"
18 #include "content/common/browser_plugin/browser_plugin_messages.h" 19 #include "content/common/browser_plugin/browser_plugin_messages.h"
19 #include "content/common/view_messages.h" 20 #include "content/common/view_messages.h"
20 #include "content/public/common/content_client.h" 21 #include "content/public/common/content_client.h"
21 #include "content/public/common/content_switches.h" 22 #include "content/public/common/content_switches.h"
22 #include "content/public/renderer/browser_plugin_delegate.h" 23 #include "content/public/renderer/browser_plugin_delegate.h"
23 #include "content/public/renderer/content_renderer_client.h" 24 #include "content/public/renderer/content_renderer_client.h"
24 #include "content/renderer/accessibility/render_accessibility_impl.h" 25 #include "content/renderer/accessibility/render_accessibility_impl.h"
25 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 26 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
26 #include "content/renderer/child_frame_compositing_helper.h" 27 #include "content/renderer/child_frame_compositing_helper.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, 114 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents,
114 OnShouldAcceptTouchEvents) 115 OnShouldAcceptTouchEvents)
115 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetChildFrameSurface, 116 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetChildFrameSurface,
116 OnSetChildFrameSurface) 117 OnSetChildFrameSurface)
117 IPC_END_MESSAGE_MAP() 118 IPC_END_MESSAGE_MAP()
118 return handled; 119 return handled;
119 } 120 }
120 121
121 void BrowserPlugin::OnSetChildFrameSurface( 122 void BrowserPlugin::OnSetChildFrameSurface(
122 int browser_plugin_instance_id, 123 int browser_plugin_instance_id,
123 const cc::SurfaceId& surface_id, 124 const cc::SurfaceInfo& surface_info,
124 const gfx::Size& frame_size,
125 float scale_factor,
126 const cc::SurfaceSequence& sequence) { 125 const cc::SurfaceSequence& sequence) {
127 if (!attached()) 126 if (!attached())
128 return; 127 return;
129 128
130 EnableCompositing(true); 129 EnableCompositing(true);
131 DCHECK(compositing_helper_.get()); 130 DCHECK(compositing_helper_.get());
132 compositing_helper_->OnSetSurface( 131 compositing_helper_->OnSetSurface(surface_info, sequence);
133 cc::SurfaceInfo(surface_id, scale_factor, frame_size), sequence);
134 } 132 }
135 133
136 void BrowserPlugin::SendSatisfySequence(const cc::SurfaceSequence& sequence) { 134 void BrowserPlugin::SendSatisfySequence(const cc::SurfaceSequence& sequence) {
137 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SatisfySequence( 135 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SatisfySequence(
138 render_frame_routing_id_, browser_plugin_instance_id_, sequence)); 136 render_frame_routing_id_, browser_plugin_instance_id_, sequence));
139 } 137 }
140 138
141 void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name, 139 void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name,
142 const base::string16& attribute_value) { 140 const base::string16& attribute_value) {
143 if (!container()) 141 if (!container())
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 618
621 bool BrowserPlugin::HandleMouseLockedInputEvent( 619 bool BrowserPlugin::HandleMouseLockedInputEvent(
622 const blink::WebMouseEvent& event) { 620 const blink::WebMouseEvent& event) {
623 BrowserPluginManager::Get()->Send( 621 BrowserPluginManager::Get()->Send(
624 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 622 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
625 &event)); 623 &event));
626 return true; 624 return true;
627 } 625 }
628 626
629 } // namespace content 627 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698