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

Side by Side Diff: webkit/plugins/ppapi/message_channel.cc

Issue 8826011: Remove PP_Module from parameters for PPB_Var.VarFromUtf8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 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 | « webkit/plugins/ppapi/host_var_tracker.h ('k') | webkit/plugins/ppapi/npapi_glue.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/message_channel.h" 5 #include "webkit/plugins/ppapi/message_channel.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // structure. The details and PPAPI changes for this are TBD. 104 // structure. The details and PPAPI changes for this are TBD.
105 PP_Var CopyPPVar(const PP_Var& var) { 105 PP_Var CopyPPVar(const PP_Var& var) {
106 if (var.type == PP_VARTYPE_OBJECT) { 106 if (var.type == PP_VARTYPE_OBJECT) {
107 // Objects are not currently supported. 107 // Objects are not currently supported.
108 NOTIMPLEMENTED(); 108 NOTIMPLEMENTED();
109 return PP_MakeUndefined(); 109 return PP_MakeUndefined();
110 } else if (var.type == PP_VARTYPE_STRING) { 110 } else if (var.type == PP_VARTYPE_STRING) {
111 StringVar* string = StringVar::FromPPVar(var); 111 StringVar* string = StringVar::FromPPVar(var);
112 if (!string) 112 if (!string)
113 return PP_MakeUndefined(); 113 return PP_MakeUndefined();
114 return StringVar::StringToPPVar(string->pp_module(), string->value()); 114 return StringVar::StringToPPVar(string->value());
115 } else { 115 } else {
116 return var; 116 return var;
117 } 117 }
118 } 118 }
119 119
120 //------------------------------------------------------------------------------ 120 //------------------------------------------------------------------------------
121 // Implementations of NPClass functions. These are here to: 121 // Implementations of NPClass functions. These are here to:
122 // - Implement postMessage behavior. 122 // - Implement postMessage behavior.
123 // - Forward calls to the 'passthrough' object to allow backwards-compatibility 123 // - Forward calls to the 'passthrough' object to allow backwards-compatibility
124 // with GetInstanceObject() objects. 124 // with GetInstanceObject() objects.
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 // SetPassthroughObject(passthrough_object()); 381 // SetPassthroughObject(passthrough_object());
382 if (passthrough_object_) 382 if (passthrough_object_)
383 WebBindings::releaseObject(passthrough_object_); 383 WebBindings::releaseObject(passthrough_object_);
384 384
385 passthrough_object_ = passthrough; 385 passthrough_object_ = passthrough;
386 } 386 }
387 387
388 } // namespace ppapi 388 } // namespace ppapi
389 } // namespace webkit 389 } // namespace webkit
390 390
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/host_var_tracker.h ('k') | webkit/plugins/ppapi/npapi_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698