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

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: Updated 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 "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" 10 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 static_cast<RenderViewHostImpl*>(render_view_host); 220 static_cast<RenderViewHostImpl*>(render_view_host);
221 guest_rvh->StopHangMonitorTimeout(); 221 guest_rvh->StopHangMonitorTimeout();
222 DCHECK(pending_input_event_reply_.get()); 222 DCHECK(pending_input_event_reply_.get());
223 IPC::Message* reply_message = pending_input_event_reply_.release(); 223 IPC::Message* reply_message = pending_input_event_reply_.release();
224 BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams(reply_message, 224 BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams(reply_message,
225 handled, 225 handled,
226 cursor_); 226 cursor_);
227 SendMessageToEmbedder(reply_message); 227 SendMessageToEmbedder(reply_message);
228 } 228 }
229 229
230 void BrowserPluginGuest::Stop() {
231 web_contents()->Stop();
232 }
233
234 void BrowserPluginGuest::Reload() {
235 fprintf(stderr, ">>>%s\n", __PRETTY_FUNCTION__);
236 web_contents()->GetController().Reload(false);
237 }
238
230 void BrowserPluginGuest::SetFocus(bool focused) { 239 void BrowserPluginGuest::SetFocus(bool focused) {
231 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); 240 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost();
232 render_view_host->Send( 241 render_view_host->Send(
233 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); 242 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused));
234 } 243 }
235 244
236 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, 245 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host,
237 int route_id, 246 int route_id,
238 const gfx::Rect& initial_pos) { 247 const gfx::Rect& initial_pos) {
239 gfx::Rect screen_pos(initial_pos); 248 gfx::Rect screen_pos(initial_pos);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 pending_updates_.Remove(iter.GetCurrentKey()); 282 pending_updates_.Remove(iter.GetCurrentKey());
274 iter.Advance(); 283 iter.Advance();
275 } 284 }
276 } 285 }
277 286
278 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 287 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
279 embedder_render_process_host()->Send(msg); 288 embedder_render_process_host()->Send(msg);
280 } 289 }
281 290
282 } // namespace content 291 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698