| OLD | NEW |
| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_string_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // process. We essentially ignore all subsequent calls to SetSrcAttribute | 282 // process. We essentially ignore all subsequent calls to SetSrcAttribute |
| 283 // until we receive an instance ID. |before_first_navigation_| | 283 // until we receive an instance ID. |before_first_navigation_| |
| 284 // prevents BrowserPlugin from allocating more than one instance ID. | 284 // prevents BrowserPlugin from allocating more than one instance ID. |
| 285 // Upon receiving an instance ID from the browser process, we continue | 285 // Upon receiving an instance ID from the browser process, we continue |
| 286 // the process of navigation by populating the | 286 // the process of navigation by populating the |
| 287 // BrowserPluginHostMsg_Attach_Params with the current state of | 287 // BrowserPluginHostMsg_Attach_Params with the current state of |
| 288 // BrowserPlugin and sending a BrowserPluginHostMsg_CreateGuest to the | 288 // BrowserPlugin and sending a BrowserPluginHostMsg_CreateGuest to the |
| 289 // browser process in order to create a new guest. | 289 // browser process in order to create a new guest. |
| 290 if (before_first_navigation_) { | 290 if (before_first_navigation_) { |
| 291 browser_plugin_manager()->AllocateInstanceID( | 291 browser_plugin_manager()->AllocateInstanceID( |
| 292 weak_ptr_factory_.GetWeakPtr()); | 292 weak_ptr_factory_.GetWeakPtr(), src); |
| 293 before_first_navigation_ = false; | 293 before_first_navigation_ = false; |
| 294 } | 294 } |
| 295 return true; | 295 return true; |
| 296 } | 296 } |
| 297 | 297 |
| 298 browser_plugin_manager()->Send( | 298 browser_plugin_manager()->Send( |
| 299 new BrowserPluginHostMsg_NavigateGuest(render_view_routing_id_, | 299 new BrowserPluginHostMsg_NavigateGuest(render_view_routing_id_, |
| 300 guest_instance_id_, | 300 guest_instance_id_, |
| 301 src)); | 301 src)); |
| 302 return true; | 302 return true; |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 const blink::WebMouseEvent& event) { | 1150 const blink::WebMouseEvent& event) { |
| 1151 browser_plugin_manager()->Send( | 1151 browser_plugin_manager()->Send( |
| 1152 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, | 1152 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, |
| 1153 guest_instance_id_, | 1153 guest_instance_id_, |
| 1154 plugin_rect_, | 1154 plugin_rect_, |
| 1155 &event)); | 1155 &event)); |
| 1156 return true; | 1156 return true; |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 } // namespace content | 1159 } // namespace content |
| OLD | NEW |