diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 21:18:51 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 21:18:51 +0000 |
commit | ddf75903e284dbc1ce36d8b8dfd6ba7e422128d5 (patch) | |
tree | c0a0fd9b530488f07c1dc3ab650c75a272ad05f9 /webkit/glue | |
parent | 59db6e39a0763b689be197f207261d7b50a6ab53 (diff) | |
download | chromium_src-ddf75903e284dbc1ce36d8b8dfd6ba7e422128d5.zip chromium_src-ddf75903e284dbc1ce36d8b8dfd6ba7e422128d5.tar.gz chromium_src-ddf75903e284dbc1ce36d8b8dfd6ba7e422128d5.tar.bz2 |
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
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/npruntime_util.cc | 51 | ||||
-rw-r--r-- | webkit/glue/npruntime_util.h | 24 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.gypi | 2 |
3 files changed, 0 insertions, 77 deletions
diff --git a/webkit/glue/npruntime_util.cc b/webkit/glue/npruntime_util.cc deleted file mode 100644 index 1b249db..0000000 --- a/webkit/glue/npruntime_util.cc +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "webkit/glue/npruntime_util.h" - -#include "base/pickle.h" -#include "third_party/WebKit/public/web/WebBindings.h" - -using WebKit::WebBindings; - -namespace webkit_glue { - -bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) { - const NPUTF8* string; - int32_t number; - bool is_string; - WebBindings::extractIdentifierData(identifier, string, number, is_string); - - if (!pickle->WriteBool(is_string)) - return false; - if (is_string) { - // Write the null byte for efficiency on the other end. - return pickle->WriteData(string, strlen(string) + 1); - } - return pickle->WriteInt(number); -} - -bool DeserializeNPIdentifier(PickleIterator* pickle_iter, - NPIdentifier* identifier) { - bool is_string; - if (!pickle_iter->ReadBool(&is_string)) - return false; - - if (is_string) { - const char* data; - int data_len; - if (!pickle_iter->ReadData(&data, &data_len)) - return false; - DCHECK_EQ((static_cast<size_t>(data_len)), strlen(data) + 1); - *identifier = WebBindings::getStringIdentifier(data); - } else { - int number; - if (!pickle_iter->ReadInt(&number)) - return false; - *identifier = WebBindings::getIntIdentifier(number); - } - return true; -} - -} // namespace webkit_glue diff --git a/webkit/glue/npruntime_util.h b/webkit/glue/npruntime_util.h deleted file mode 100644 index 401f771..0000000 --- a/webkit/glue/npruntime_util.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_GLUE_NPRUNTIME_UTIL_H_ -#define WEBKIT_GLUE_NPRUNTIME_UTIL_H_ - -#include "third_party/npapi/bindings/npruntime.h" -#include "webkit/glue/webkit_glue_export.h" - -class Pickle; -class PickleIterator; - -namespace webkit_glue { - -// Efficiently serialize/deserialize a NPIdentifier -WEBKIT_GLUE_EXPORT bool SerializeNPIdentifier(NPIdentifier identifier, - Pickle* pickle); -WEBKIT_GLUE_EXPORT bool DeserializeNPIdentifier(PickleIterator* pickle_iter, - NPIdentifier* identifier); - -} // namespace webkit_glue - -#endif // WEBKIT_GLUE_NPRUNTIME_UTIL_H_ diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 32fc388..89287f6 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -280,8 +280,6 @@ 'image_decoder.cc', 'image_decoder.h', 'network_list_observer.h', - 'npruntime_util.cc', - 'npruntime_util.h', 'resource_loader_bridge.cc', 'resource_loader_bridge.h', 'resource_request_body.cc', |