Commit ddf75903 authored by ananta@chromium.org's avatar ananta@chromium.org

Move the npruntime_util.h/.cc files from webkit\glue to content\child.

This is continuation of the ongoing work for bug https://code.google.com/p/chromium/issues/detail?can=2&q=237249
which is splitting chrome.dll into a browser and renderer component due to build issues on Windows.

BUG=237249
TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/17068016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207922 0039d316-1c4b-4281-b951-d872f2087c98
parent 59db6e39
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "webkit/glue/npruntime_util.h" #include "content/child/npruntime_util.h"
#include "base/pickle.h" #include "base/pickle.h"
#include "third_party/WebKit/public/web/WebBindings.h" #include "third_party/WebKit/public/web/WebBindings.h"
using WebKit::WebBindings; using WebKit::WebBindings;
namespace webkit_glue { namespace content {
bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) { bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) {
const NPUTF8* string; const NPUTF8* string;
...@@ -48,4 +48,4 @@ bool DeserializeNPIdentifier(PickleIterator* pickle_iter, ...@@ -48,4 +48,4 @@ bool DeserializeNPIdentifier(PickleIterator* pickle_iter,
return true; return true;
} }
} // namespace webkit_glue } // namespace content
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef WEBKIT_GLUE_NPRUNTIME_UTIL_H_ #ifndef CONTENT_CHILD_NPRUNTIME_UTIL_H_
#define WEBKIT_GLUE_NPRUNTIME_UTIL_H_ #define CONTENT_CHILD_NPRUNTIME_UTIL_H_
#include "third_party/npapi/bindings/npruntime.h" #include "third_party/npapi/bindings/npruntime.h"
#include "webkit/glue/webkit_glue_export.h"
class Pickle; class Pickle;
class PickleIterator; class PickleIterator;
namespace webkit_glue { namespace content {
// Efficiently serialize/deserialize a NPIdentifier // Efficiently serialize/deserialize a NPIdentifier
WEBKIT_GLUE_EXPORT bool SerializeNPIdentifier(NPIdentifier identifier, bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle);
Pickle* pickle); bool DeserializeNPIdentifier(PickleIterator* pickle_iter,
WEBKIT_GLUE_EXPORT bool DeserializeNPIdentifier(PickleIterator* pickle_iter, NPIdentifier* identifier);
NPIdentifier* identifier);
} // namespace webkit_glue } // namespace content
#endif // CONTENT_CHILD_NPRUNTIME_UTIL_H_
#endif // WEBKIT_GLUE_NPRUNTIME_UTIL_H_
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#include "content/child/plugin_param_traits.h" #include "content/child/plugin_param_traits.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "content/child/npruntime_util.h"
#include "ipc/ipc_message_utils.h" #include "ipc/ipc_message_utils.h"
#include "third_party/WebKit/public/web/WebBindings.h" #include "third_party/WebKit/public/web/WebBindings.h"
#include "webkit/glue/npruntime_util.h"
#include "webkit/plugins/npapi/plugin_host.h" #include "webkit/plugins/npapi/plugin_host.h"
namespace content { namespace content {
...@@ -115,13 +115,13 @@ void ParamTraits<NPVariant_Param>::Log(const param_type& p, std::string* l) { ...@@ -115,13 +115,13 @@ void ParamTraits<NPVariant_Param>::Log(const param_type& p, std::string* l) {
} }
void ParamTraits<NPIdentifier_Param>::Write(Message* m, const param_type& p) { void ParamTraits<NPIdentifier_Param>::Write(Message* m, const param_type& p) {
webkit_glue::SerializeNPIdentifier(p.identifier, m); content::SerializeNPIdentifier(p.identifier, m);
} }
bool ParamTraits<NPIdentifier_Param>::Read(const Message* m, bool ParamTraits<NPIdentifier_Param>::Read(const Message* m,
PickleIterator* iter, PickleIterator* iter,
param_type* r) { param_type* r) {
return webkit_glue::DeserializeNPIdentifier(iter, &r->identifier); return content::DeserializeNPIdentifier(iter, &r->identifier);
} }
void ParamTraits<NPIdentifier_Param>::Log(const param_type& p, std::string* l) { void ParamTraits<NPIdentifier_Param>::Log(const param_type& p, std::string* l) {
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#define CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ #define CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_
#include <string> #include <string>
#include "content/child/npruntime_util.h"
#include "ipc/ipc_message.h" #include "ipc/ipc_message.h"
#include "ipc/ipc_param_traits.h" #include "ipc/ipc_param_traits.h"
#include "webkit/glue/npruntime_util.h"
namespace content { namespace content {
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
'child/npobject_base.h', 'child/npobject_base.h',
'child/npobject_proxy.cc', 'child/npobject_proxy.cc',
'child/npobject_proxy.h', 'child/npobject_proxy.h',
'child/npruntime_util.cc',
'child/npruntime_util.h',
'child/npobject_stub.cc', 'child/npobject_stub.cc',
'child/npobject_stub.h', 'child/npobject_stub.h',
'child/npobject_util.cc', 'child/npobject_util.cc',
......
...@@ -280,8 +280,6 @@ ...@@ -280,8 +280,6 @@
'image_decoder.cc', 'image_decoder.cc',
'image_decoder.h', 'image_decoder.h',
'network_list_observer.h', 'network_list_observer.h',
'npruntime_util.cc',
'npruntime_util.h',
'resource_loader_bridge.cc', 'resource_loader_bridge.cc',
'resource_loader_bridge.h', 'resource_loader_bridge.h',
'resource_request_body.cc', 'resource_request_body.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment