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/npobject_stub.h" | 5 #include "chrome/plugin/npobject_stub.h" |
6 | 6 |
7 #include "chrome/common/child_process_logging.h" | 7 #include "chrome/common/child_process_logging.h" |
8 #include "chrome/common/plugin_messages.h" | 8 #include "chrome/common/plugin_messages.h" |
9 #include "chrome/plugin/npobject_util.h" | 9 #include "chrome/plugin/npobject_util.h" |
10 #include "chrome/plugin/plugin_channel_base.h" | 10 #include "chrome/plugin/plugin_channel_base.h" |
11 #include "chrome/plugin/plugin_thread.h" | 11 #include "chrome/plugin/plugin_thread.h" |
12 #include "third_party/npapi/bindings/npapi.h" | 12 #include "third_party/npapi/bindings/npapi.h" |
13 #include "third_party/npapi/bindings/npruntime.h" | 13 #include "third_party/npapi/bindings/npruntime.h" |
14 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" |
15 #include "webkit/glue/plugins/plugin_constants_win.h" | 15 #include "webkit/plugins/npapi/plugin_constants_win.h" |
16 | 16 |
17 using WebKit::WebBindings; | 17 using WebKit::WebBindings; |
18 | 18 |
19 NPObjectStub::NPObjectStub( | 19 NPObjectStub::NPObjectStub( |
20 NPObject* npobject, | 20 NPObject* npobject, |
21 PluginChannelBase* channel, | 21 PluginChannelBase* channel, |
22 int route_id, | 22 int route_id, |
23 gfx::NativeViewId containing_window, | 23 gfx::NativeViewId containing_window, |
24 const GURL& page_url) | 24 const GURL& page_url) |
25 : npobject_(npobject), | 25 : npobject_(npobject), |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return; | 236 return; |
237 } | 237 } |
238 | 238 |
239 if (IsPluginProcess()) { | 239 if (IsPluginProcess()) { |
240 if (npobject_->_class->setProperty) { | 240 if (npobject_->_class->setProperty) { |
241 #if defined(OS_WIN) | 241 #if defined(OS_WIN) |
242 static std::wstring filename = StringToLowerASCII( | 242 static std::wstring filename = StringToLowerASCII( |
243 PluginThread::current()->plugin_path().BaseName().value()); | 243 PluginThread::current()->plugin_path().BaseName().value()); |
244 static NPIdentifier fullscreen = | 244 static NPIdentifier fullscreen = |
245 WebBindings::getStringIdentifier("fullScreen"); | 245 WebBindings::getStringIdentifier("fullScreen"); |
246 if (filename == kNewWMPPlugin && id == fullscreen) { | 246 if (filename == webkit::npapi::kNewWMPPlugin && id == fullscreen) { |
247 // Workaround for bug 15985, which is if Flash causes WMP to go | 247 // Workaround for bug 15985, which is if Flash causes WMP to go |
248 // full screen a deadlock can occur when WMP calls SetFocus. | 248 // full screen a deadlock can occur when WMP calls SetFocus. |
249 NPObjectMsg_SetProperty::WriteReplyParams(reply_msg, true); | 249 NPObjectMsg_SetProperty::WriteReplyParams(reply_msg, true); |
250 Send(reply_msg); | 250 Send(reply_msg); |
251 reply_msg = NULL; | 251 reply_msg = NULL; |
252 } | 252 } |
253 #endif | 253 #endif |
254 result = npobject_->_class->setProperty(npobject_, id, &property_var); | 254 result = npobject_->_class->setProperty(npobject_, id, &property_var); |
255 } else { | 255 } else { |
256 result = false; | 256 result = false; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 bool return_value = WebBindings::evaluateHelper(0, popups_allowed, npobject_, | 390 bool return_value = WebBindings::evaluateHelper(0, popups_allowed, npobject_, |
391 &script_string, &result_var); | 391 &script_string, &result_var); |
392 | 392 |
393 NPVariant_Param result_param; | 393 NPVariant_Param result_param; |
394 CreateNPVariantParam( | 394 CreateNPVariantParam( |
395 result_var, local_channel, &result_param, true, containing_window_, | 395 result_var, local_channel, &result_param, true, containing_window_, |
396 page_url_); | 396 page_url_); |
397 NPObjectMsg_Evaluate::WriteReplyParams(reply_msg, result_param, return_value); | 397 NPObjectMsg_Evaluate::WriteReplyParams(reply_msg, result_param, return_value); |
398 local_channel->Send(reply_msg); | 398 local_channel->Send(reply_msg); |
399 } | 399 } |
OLD | NEW |