Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 web_contents()->GetController().Reload(false); | |
|
Charlie Reis
2012/09/19 22:17:09
The NavigationController documentation says most c
Fady Samuel
2012/09/19 23:29:20
Done.
| |
| 234 } | |
| 235 | |
| 228 void BrowserPluginGuest::SetFocus(bool focused) { | 236 void BrowserPluginGuest::SetFocus(bool focused) { |
| 229 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); | 237 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); |
| 230 render_view_host->Send( | 238 render_view_host->Send( |
| 231 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); | 239 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); |
| 232 } | 240 } |
| 233 | 241 |
| 234 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, | 242 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, |
| 235 int route_id, | 243 int route_id, |
| 236 const gfx::Rect& initial_pos) { | 244 const gfx::Rect& initial_pos) { |
| 237 gfx::Rect screen_pos(initial_pos); | 245 gfx::Rect screen_pos(initial_pos); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 pending_updates_.Remove(iter.GetCurrentKey()); | 279 pending_updates_.Remove(iter.GetCurrentKey()); |
| 272 iter.Advance(); | 280 iter.Advance(); |
| 273 } | 281 } |
| 274 } | 282 } |
| 275 | 283 |
| 276 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { | 284 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { |
| 277 embedder_render_process_host()->Send(msg); | 285 embedder_render_process_host()->Send(msg); |
| 278 } | 286 } |
| 279 | 287 |
| 280 } // namespace content | 288 } // namespace content |
| OLD | NEW |