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

Side by Side Diff: chrome/plugin/npobject_proxy.cc

Issue 5998002: Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/plugin/chrome_plugin_host.cc ('k') | chrome/plugin/npobject_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_proxy.h" 5 #include "chrome/plugin/npobject_proxy.h"
6 6
7 #include "chrome/common/plugin_messages.h" 7 #include "chrome/common/plugin_messages.h"
8 #include "chrome/plugin/npobject_util.h" 8 #include "chrome/plugin/npobject_util.h"
9 #include "chrome/plugin/plugin_channel.h" 9 #include "chrome/plugin/plugin_channel.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
11 #include "webkit/glue/webkit_glue.h" 11 #include "webkit/glue/webkit_glue.h"
12 #include "webkit/plugins/npapi/plugin_instance.h" 12 #include "webkit/glue/plugins/plugin_instance.h"
13 13
14 using WebKit::WebBindings; 14 using WebKit::WebBindings;
15 15
16 struct NPObjectWrapper { 16 struct NPObjectWrapper {
17 NPObject object; 17 NPObject object;
18 NPObjectProxy* proxy; 18 NPObjectProxy* proxy;
19 }; 19 };
20 20
21 NPClass NPObjectProxy::npclass_proxy_ = { 21 NPClass NPObjectProxy::npclass_proxy_ = {
22 NP_CLASS_STRUCT_VERSION, 22 NP_CLASS_STRUCT_VERSION,
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 NPObjectProxy* proxy = GetProxy(obj); 453 NPObjectProxy* proxy = GetProxy(obj);
454 if (!proxy) { 454 if (!proxy) {
455 return false; 455 return false;
456 } 456 }
457 457
458 bool result = false; 458 bool result = false;
459 gfx::NativeViewId containing_window = proxy->containing_window_; 459 gfx::NativeViewId containing_window = proxy->containing_window_;
460 bool popups_allowed = false; 460 bool popups_allowed = false;
461 461
462 if (npp) { 462 if (npp) {
463 webkit::npapi::PluginInstance* plugin_instance = 463 NPAPI::PluginInstance* plugin_instance =
464 reinterpret_cast<webkit::npapi::PluginInstance*>(npp->ndata); 464 reinterpret_cast<NPAPI::PluginInstance*>(npp->ndata);
465 if (plugin_instance) 465 if (plugin_instance)
466 popups_allowed = plugin_instance->popups_allowed(); 466 popups_allowed = plugin_instance->popups_allowed();
467 } 467 }
468 468
469 NPVariant_Param result_param; 469 NPVariant_Param result_param;
470 std::string script_str = std::string( 470 std::string script_str = std::string(
471 script->UTF8Characters, script->UTF8Length); 471 script->UTF8Characters, script->UTF8Length);
472 472
473 NPObjectMsg_Evaluate* msg = new NPObjectMsg_Evaluate(proxy->route_id(), 473 NPObjectMsg_Evaluate* msg = new NPObjectMsg_Evaluate(proxy->route_id(),
474 script_str, 474 script_str,
(...skipping 15 matching lines...) Expand all
490 proxy->Send(msg); 490 proxy->Send(msg);
491 // Send may delete proxy. 491 // Send may delete proxy.
492 proxy = NULL; 492 proxy = NULL;
493 if (!result) 493 if (!result)
494 return false; 494 return false;
495 495
496 CreateNPVariant( 496 CreateNPVariant(
497 result_param, channel.get(), result_var, containing_window, page_url); 497 result_param, channel.get(), result_var, containing_window, page_url);
498 return true; 498 return true;
499 } 499 }
OLDNEW
« no previous file with comments | « chrome/plugin/chrome_plugin_host.cc ('k') | chrome/plugin/npobject_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698