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

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

Issue 10917225: Browser Plugin: Reload and Stop operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments + merged with ToT/latest patch Created 8 years, 3 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 | Annotate | Revision Log
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_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 static_cast<RenderViewHostImpl*>(render_view_host); 218 static_cast<RenderViewHostImpl*>(render_view_host);
219 guest_rvh->StopHangMonitorTimeout(); 219 guest_rvh->StopHangMonitorTimeout();
220 DCHECK(pending_input_event_reply_.get()); 220 DCHECK(pending_input_event_reply_.get());
221 IPC::Message* reply_message = pending_input_event_reply_.release(); 221 IPC::Message* reply_message = pending_input_event_reply_.release();
222 BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams(reply_message, 222 BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams(reply_message,
223 handled, 223 handled,
224 cursor_); 224 cursor_);
225 SendMessageToEmbedder(reply_message); 225 SendMessageToEmbedder(reply_message);
226 } 226 }
227 227
228 void BrowserPluginGuest::Stop() {
229 web_contents()->Stop();
230 }
231
232 void BrowserPluginGuest::Reload() {
233 fprintf(stderr, ">>>%s\n", __PRETTY_FUNCTION__);
lazyboy 2012/09/19 15:06:06 Remove.
Fady Samuel 2012/09/19 15:50:56 Done.
234 web_contents()->GetController().Reload(false);
235 }
236
228 void BrowserPluginGuest::SetFocus(bool focused) { 237 void BrowserPluginGuest::SetFocus(bool focused) {
229 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); 238 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost();
230 render_view_host->Send( 239 render_view_host->Send(
231 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); 240 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused));
232 } 241 }
233 242
234 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, 243 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host,
235 int route_id, 244 int route_id,
236 const gfx::Rect& initial_pos) { 245 const gfx::Rect& initial_pos) {
237 gfx::Rect screen_pos(initial_pos); 246 gfx::Rect screen_pos(initial_pos);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 pending_updates_.Remove(iter.GetCurrentKey()); 280 pending_updates_.Remove(iter.GetCurrentKey());
272 iter.Advance(); 281 iter.Advance();
273 } 282 }
274 } 283 }
275 284
276 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 285 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
277 embedder_render_process_host()->Send(msg); 286 embedder_render_process_host()->Send(msg);
278 } 287 }
279 288
280 } // namespace content 289 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698