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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 1413643002: Separate RenderViewHost from RenderWidgetHost, part 2: public implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 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 | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('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 (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/browser_plugin/browser_plugin_embedder.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
6 6
7 #include "content/browser/browser_plugin/browser_plugin_guest.h" 7 #include "content/browser/browser_plugin/browser_plugin_guest.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 9 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/common/browser_plugin/browser_plugin_messages.h" 10 #include "content/common/browser_plugin/browser_plugin_messages.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (guest_started_drag_) 98 if (guest_started_drag_)
99 guest_started_drag_.reset(); 99 guest_started_drag_.reset();
100 } else { 100 } else {
101 guest_drag_ending_ = true; 101 guest_drag_ending_ = true;
102 } 102 }
103 } 103 }
104 104
105 // static 105 // static
106 bool BrowserPluginEmbedder::DidSendScreenRectsCallback( 106 bool BrowserPluginEmbedder::DidSendScreenRectsCallback(
107 WebContents* guest_web_contents) { 107 WebContents* guest_web_contents) {
108 static_cast<RenderViewHostImpl*>( 108 RenderWidgetHostImpl::From(
109 guest_web_contents->GetRenderViewHost())->SendScreenRects(); 109 guest_web_contents->GetRenderViewHost()->GetWidget())
110 ->SendScreenRects();
110 // Not handled => Iterate over all guests. 111 // Not handled => Iterate over all guests.
111 return false; 112 return false;
112 } 113 }
113 114
114 void BrowserPluginEmbedder::DidSendScreenRects() { 115 void BrowserPluginEmbedder::DidSendScreenRects() {
115 GetBrowserPluginGuestManager()->ForEachGuest( 116 GetBrowserPluginGuestManager()->ForEachGuest(
116 web_contents(), 117 web_contents(),
117 base::Bind(&BrowserPluginEmbedder::DidSendScreenRectsCallback)); 118 base::Bind(&BrowserPluginEmbedder::DidSendScreenRectsCallback));
118 } 119 }
119 120
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest() 252 if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest()
252 ->StopFinding(action)) { 253 ->StopFinding(action)) {
253 // There can only ever currently be one browser plugin that handles find so 254 // There can only ever currently be one browser plugin that handles find so
254 // we can break the iteration at this point. 255 // we can break the iteration at this point.
255 return true; 256 return true;
256 } 257 }
257 return false; 258 return false;
258 } 259 }
259 260
260 } // namespace content 261 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698