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

Side by Side Diff: content/child/plugin_param_traits.cc

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/child/plugin_param_traits.h" 5 #include "content/child/plugin_param_traits.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "content/child/npapi/plugin_host.h"
8 #include "content/child/npruntime_util.h" 9 #include "content/child/npruntime_util.h"
9 #include "ipc/ipc_message_utils.h" 10 #include "ipc/ipc_message_utils.h"
10 #include "third_party/WebKit/public/web/WebBindings.h" 11 #include "third_party/WebKit/public/web/WebBindings.h"
11 #include "webkit/plugins/npapi/plugin_host.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 NPIdentifier_Param::NPIdentifier_Param() 15 NPIdentifier_Param::NPIdentifier_Param()
16 : identifier() { 16 : identifier() {
17 } 17 }
18 18
19 NPIdentifier_Param::~NPIdentifier_Param() { 19 NPIdentifier_Param::~NPIdentifier_Param() {
20 } 20 }
21 21
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bool ParamTraits<NPIdentifier_Param>::Read(const Message* m, 121 bool ParamTraits<NPIdentifier_Param>::Read(const Message* m,
122 PickleIterator* iter, 122 PickleIterator* iter,
123 param_type* r) { 123 param_type* r) {
124 return content::DeserializeNPIdentifier(iter, &r->identifier); 124 return content::DeserializeNPIdentifier(iter, &r->identifier);
125 } 125 }
126 126
127 void ParamTraits<NPIdentifier_Param>::Log(const param_type& p, std::string* l) { 127 void ParamTraits<NPIdentifier_Param>::Log(const param_type& p, std::string* l) {
128 if (WebKit::WebBindings::identifierIsString(p.identifier)) { 128 if (WebKit::WebBindings::identifierIsString(p.identifier)) {
129 NPUTF8* str = WebKit::WebBindings::utf8FromIdentifier(p.identifier); 129 NPUTF8* str = WebKit::WebBindings::utf8FromIdentifier(p.identifier);
130 l->append(str); 130 l->append(str);
131 webkit::npapi::PluginHost::Singleton()->host_functions()->memfree(str); 131 content::PluginHost::Singleton()->host_functions()->memfree(str);
132 } else { 132 } else {
133 l->append(base::IntToString( 133 l->append(base::IntToString(
134 WebKit::WebBindings::intFromIdentifier(p.identifier))); 134 WebKit::WebBindings::intFromIdentifier(p.identifier)));
135 } 135 }
136 } 136 }
137 137
138 } // namespace IPC 138 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698