| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/plugin/webplugin_delegate_stub.h" | 5 #include "chrome/plugin/webplugin_delegate_stub.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 10 #include "chrome/common/gfx/emf.h" | 10 #include "chrome/common/gfx/emf.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 NPObject* object = delegate_->GetPluginScriptableObject(); | 250 NPObject* object = delegate_->GetPluginScriptableObject(); |
| 251 if (!object) { | 251 if (!object) { |
| 252 *route_id = MSG_ROUTING_NONE; | 252 *route_id = MSG_ROUTING_NONE; |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| 256 *route_id = channel_->GenerateRouteID(); | 256 *route_id = channel_->GenerateRouteID(); |
| 257 *npobject_ptr = object; | 257 *npobject_ptr = object; |
| 258 // The stub will delete itself when the proxy tells it that it's released, or | 258 // The stub will delete itself when the proxy tells it that it's released, or |
| 259 // otherwise when the channel is closed. | 259 // otherwise when the channel is closed. |
| 260 NPObjectStub* stub = new NPObjectStub(object, channel_.get(), *route_id); | 260 NPObjectStub* stub = new NPObjectStub( |
| 261 object, channel_.get(), *route_id, webplugin_->modal_dialog_event()); |
| 261 | 262 |
| 262 // Release ref added by GetPluginScriptableObject (our stub holds its own). | 263 // Release ref added by GetPluginScriptableObject (our stub holds its own). |
| 263 NPN_ReleaseObject(object); | 264 NPN_ReleaseObject(object); |
| 264 } | 265 } |
| 265 | 266 |
| 266 void WebPluginDelegateStub::OnSendJavaScriptStream(const std::string& url, | 267 void WebPluginDelegateStub::OnSendJavaScriptStream(const std::string& url, |
| 267 const std::wstring& result, | 268 const std::wstring& result, |
| 268 bool success, | 269 bool success, |
| 269 bool notify_needed, | 270 bool notify_needed, |
| 270 int notify_data) { | 271 int notify_data) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 params.stream); | 334 params.stream); |
| 334 webplugin_->OnResourceCreated(params.resource_id, resource_client); | 335 webplugin_->OnResourceCreated(params.resource_id, resource_client); |
| 335 } | 336 } |
| 336 | 337 |
| 337 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, | 338 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, |
| 338 bool notify_needed, | 339 bool notify_needed, |
| 339 HANDLE notify_data) { | 340 HANDLE notify_data) { |
| 340 delegate_->URLRequestRouted(url, notify_needed, notify_data); | 341 delegate_->URLRequestRouted(url, notify_needed, notify_data); |
| 341 } | 342 } |
| 342 | 343 |
| OLD | NEW |