summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-06-02 00:02:47 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 07:03:21 +0000
commit05cfd8ddb3849b7e11bb53e199064291a52aeea9 (patch)
treec197bfdf337bee3b804219251c43e4323ae9a6ae /ppapi
parent7f9715680150b2f0c3ae46a227075859c73042b2 (diff)
downloadchromium_src-05cfd8ddb3849b7e11bb53e199064291a52aeea9.zip
chromium_src-05cfd8ddb3849b7e11bb53e199064291a52aeea9.tar.gz
chromium_src-05cfd8ddb3849b7e11bb53e199064291a52aeea9.tar.bz2
Move Pickle to base namespace.
Updates forward-declares and headers, but keeps a using statement in to avoid updating all users atomically. TBR=jschuh for IPC stuff Review URL: https://codereview.chromium.org/1149113006 Cr-Commit-Position: refs/heads/master@{#332352}
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/ppapi_message_utils.h10
-rw-r--r--ppapi/proxy/ppapi_param_traits.h36
-rw-r--r--ppapi/proxy/raw_var_data.h19
-rw-r--r--ppapi/proxy/resource_message_params.h18
-rw-r--r--ppapi/proxy/serialized_flash_menu.h4
-rw-r--r--ppapi/proxy/serialized_handle.h6
-rw-r--r--ppapi/proxy/serialized_structs.h1
-rw-r--r--ppapi/proxy/serialized_var.h6
8 files changed, 56 insertions, 44 deletions
diff --git a/ppapi/proxy/ppapi_message_utils.h b/ppapi/proxy/ppapi_message_utils.h
index e4757e5..6588a6e 100644
--- a/ppapi/proxy/ppapi_message_utils.h
+++ b/ppapi/proxy/ppapi_message_utils.h
@@ -71,7 +71,7 @@ bool UnpackMessage(const IPC::Message& msg, A* a) {
(internal::TupleTypeMatch1<typename MsgClass::Param, A>::kValue),
"tuple types should match");
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a);
}
@@ -81,7 +81,7 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b) {
(internal::TupleTypeMatch2<typename MsgClass::Param, A, B>::kValue),
"tuple types should match");
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) && IPC::ReadParam(&msg, &iter, b);
}
@@ -91,7 +91,7 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c) {
(internal::TupleTypeMatch3<typename MsgClass::Param, A, B, C>::kValue),
"tuple types should match");
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) &&
IPC::ReadParam(&msg, &iter, b) &&
IPC::ReadParam(&msg, &iter, c);
@@ -103,7 +103,7 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c, D* d) {
(internal::TupleTypeMatch4<typename MsgClass::Param, A, B, C, D>::kValue),
"tuple types should match");
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) &&
IPC::ReadParam(&msg, &iter, b) &&
IPC::ReadParam(&msg, &iter, c) &&
@@ -117,7 +117,7 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c, D* d, E* e) {
typename MsgClass::Param, A, B, C, D, E>::kValue),
"tuple types should match");
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) &&
IPC::ReadParam(&msg, &iter, b) &&
IPC::ReadParam(&msg, &iter, c) &&
diff --git a/ppapi/proxy/ppapi_param_traits.h b/ppapi/proxy/ppapi_param_traits.h
index d2d4762..6aff574 100644
--- a/ppapi/proxy/ppapi_param_traits.h
+++ b/ppapi/proxy/ppapi_param_traits.h
@@ -49,7 +49,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<PP_Bool> {
typedef PP_Bool param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -57,7 +57,7 @@ template <>
struct PPAPI_PROXY_EXPORT ParamTraits<PP_NetAddress_Private> {
typedef PP_NetAddress_Private param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* p);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
static void Log(const param_type& p, std::string* l);
};
@@ -65,7 +65,7 @@ template <>
struct PPAPI_PROXY_EXPORT ParamTraits<PP_KeyInformation> {
typedef PP_KeyInformation param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* p);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
static void Log(const param_type& p, std::string* l);
};
@@ -74,7 +74,7 @@ struct PPAPI_PROXY_EXPORT ParamTraits<
ppapi::proxy::PPBFlash_DrawGlyphs_Params> {
typedef ppapi::proxy::PPBFlash_DrawGlyphs_Params param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -83,7 +83,7 @@ struct PPAPI_PROXY_EXPORT ParamTraits<
ppapi::proxy::PPBURLLoader_UpdateProgress_Params> {
typedef ppapi::proxy::PPBURLLoader_UpdateProgress_Params param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -91,7 +91,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedDirEntry> {
typedef ppapi::proxy::SerializedDirEntry param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -99,7 +99,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFontDescription> {
typedef ppapi::proxy::SerializedFontDescription param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -108,7 +108,7 @@ struct PPAPI_PROXY_EXPORT
ParamTraits<ppapi::proxy::SerializedTrueTypeFontDesc> {
typedef ppapi::proxy::SerializedTrueTypeFontDesc param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -116,7 +116,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedHandle> {
typedef ppapi::proxy::SerializedHandle param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -124,7 +124,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> {
typedef ppapi::HostResource param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -132,7 +132,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedVar> {
typedef ppapi::proxy::SerializedVar param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -141,7 +141,7 @@ struct PPAPI_PROXY_EXPORT ParamTraits<
std::vector<ppapi::proxy::SerializedVar> > {
typedef std::vector<ppapi::proxy::SerializedVar> param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -149,7 +149,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PpapiPermissions> {
typedef ppapi::PpapiPermissions param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -158,7 +158,7 @@ template <>
struct ParamTraits<ppapi::PepperFilePath> {
typedef ppapi::PepperFilePath param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* p);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
static void Log(const param_type& p, std::string* l);
};
@@ -166,7 +166,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFlashMenu> {
typedef ppapi::proxy::SerializedFlashMenu param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
#endif // !defined(OS_NACL) && !defined(NACL_WIN64)
@@ -175,7 +175,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PPB_X509Certificate_Fields> {
typedef ppapi::PPB_X509Certificate_Fields param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -183,7 +183,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::SocketOptionData> {
typedef ppapi::SocketOptionData param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
@@ -191,7 +191,7 @@ template<>
struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::CompositorLayerData::Transform> {
typedef ppapi::CompositorLayerData::Transform param_type;
static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
diff --git a/ppapi/proxy/raw_var_data.h b/ppapi/proxy/raw_var_data.h
index 08b85fa..9db3100 100644
--- a/ppapi/proxy/raw_var_data.h
+++ b/ppapi/proxy/raw_var_data.h
@@ -16,7 +16,10 @@
#include "ppapi/proxy/ppapi_proxy_export.h"
#include "ppapi/proxy/serialized_handle.h"
+namespace base {
+class Pickle;
class PickleIterator;
+}
namespace IPC {
class Message;
@@ -68,7 +71,7 @@ class PPAPI_PROXY_EXPORT RawVarDataGraph {
// Create a RawVarDataGraph from the given message.
static scoped_ptr<RawVarDataGraph> Read(const IPC::Message* m,
- PickleIterator* iter);
+ base::PickleIterator* iter);
// Returns a vector of SerializedHandles associated with this RawVarDataGraph.
// Ownership of the pointers remains with the elements of the RawVarDataGraph.
@@ -113,7 +116,7 @@ class RawVarData {
// Reads the RawVarData from a message. Returns true on success.
virtual bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) = 0;
+ base::PickleIterator* iter) = 0;
// Returns a SerializedHandle associated with this RawVarData or NULL if none
// exists. Ownership of the pointer remains with the RawVarData.
@@ -140,7 +143,7 @@ class BasicRawVarData : public RawVarData {
void Write(IPC::Message* m, const HandleWriter& handle_writer) override;
bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) override;
+ base::PickleIterator* iter) override;
private:
PP_Var var_;
@@ -161,7 +164,7 @@ class StringRawVarData : public RawVarData {
void Write(IPC::Message* m, const HandleWriter& handle_writer) override;
bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) override;
+ base::PickleIterator* iter) override;
private:
// The data in the string.
@@ -190,7 +193,7 @@ class ArrayBufferRawVarData : public RawVarData {
void Write(IPC::Message* m, const HandleWriter& handle_writer) override;
bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) override;
+ base::PickleIterator* iter) override;
SerializedHandle* GetHandle() override;
private:
@@ -221,7 +224,7 @@ class ArrayRawVarData : public RawVarData {
void Write(IPC::Message* m, const HandleWriter& handle_writer) override;
bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) override;
+ base::PickleIterator* iter) override;
private:
std::vector<size_t> children_;
@@ -244,7 +247,7 @@ class DictionaryRawVarData : public RawVarData {
void Write(IPC::Message* m, const HandleWriter& handle_writer) override;
bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) override;
+ base::PickleIterator* iter) override;
private:
std::vector<std::pair<std::string, size_t> > children_;
@@ -270,7 +273,7 @@ class ResourceRawVarData : public RawVarData {
void Write(IPC::Message* m, const HandleWriter& handle_writer) override;
bool Read(PP_VarType type,
const IPC::Message* m,
- PickleIterator* iter) override;
+ base::PickleIterator* iter) override;
private:
// Resource ID in the plugin. If one has not yet been created, this is 0.
diff --git a/ppapi/proxy/resource_message_params.h b/ppapi/proxy/resource_message_params.h
index da945b3..500ebb9 100644
--- a/ppapi/proxy/resource_message_params.h
+++ b/ppapi/proxy/resource_message_params.h
@@ -73,15 +73,15 @@ class PPAPI_PROXY_EXPORT ResourceMessageParams {
ResourceMessageParams(PP_Resource resource, int32_t sequence);
virtual void Serialize(IPC::Message* msg) const;
- virtual bool Deserialize(const IPC::Message* msg, PickleIterator* iter);
+ virtual bool Deserialize(const IPC::Message* msg, base::PickleIterator* iter);
// Writes everything except the handles to |msg|.
void WriteHeader(IPC::Message* msg) const;
// Writes the handles to |msg|.
void WriteHandles(IPC::Message* msg) const;
// Matching deserialize helpers.
- bool ReadHeader(const IPC::Message* msg, PickleIterator* iter);
- bool ReadHandles(const IPC::Message* msg, PickleIterator* iter);
+ bool ReadHeader(const IPC::Message* msg, base::PickleIterator* iter);
+ bool ReadHandles(const IPC::Message* msg, base::PickleIterator* iter);
private:
class PPAPI_PROXY_EXPORT SerializedHandles
@@ -145,7 +145,8 @@ class PPAPI_PROXY_EXPORT ResourceMessageCallParams
bool has_callback() const { return has_callback_; }
void Serialize(IPC::Message* msg) const override;
- bool Deserialize(const IPC::Message* msg, PickleIterator* iter) override;
+ bool Deserialize(const IPC::Message* msg,
+ base::PickleIterator* iter) override;
private:
bool has_callback_;
@@ -163,7 +164,8 @@ class PPAPI_PROXY_EXPORT ResourceMessageReplyParams
int32_t result() const { return result_; }
void Serialize(IPC::Message* msg) const override;
- bool Deserialize(const IPC::Message* msg, PickleIterator* iter) override;
+ bool Deserialize(const IPC::Message* msg,
+ base::PickleIterator* iter) override;
// Writes everything except the handles to |msg|.
void WriteReplyHeader(IPC::Message* msg) const;
@@ -184,7 +186,8 @@ ParamTraits<ppapi::proxy::ResourceMessageCallParams> {
static void Write(Message* m, const param_type& p) {
p.Serialize(m);
}
- static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
+ static bool Read(const Message* m, base::PickleIterator* iter,
+ param_type* r) {
return r->Deserialize(m, iter);
}
static void Log(const param_type& p, std::string* l) {
@@ -197,7 +200,8 @@ ParamTraits<ppapi::proxy::ResourceMessageReplyParams> {
static void Write(Message* m, const param_type& p) {
p.Serialize(m);
}
- static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
+ static bool Read(const Message* m, base::PickleIterator* iter,
+ param_type* r) {
return r->Deserialize(m, iter);
}
static void Log(const param_type& p, std::string* l) {
diff --git a/ppapi/proxy/serialized_flash_menu.h b/ppapi/proxy/serialized_flash_menu.h
index 271caba..8c1d709 100644
--- a/ppapi/proxy/serialized_flash_menu.h
+++ b/ppapi/proxy/serialized_flash_menu.h
@@ -11,7 +11,9 @@
#include "base/basictypes.h"
#include "ppapi/proxy/ppapi_proxy_export.h"
+namespace base {
class PickleIterator;
+}
struct PP_Flash_Menu;
@@ -32,7 +34,7 @@ class PPAPI_PROXY_EXPORT SerializedFlashMenu {
const PP_Flash_Menu* pp_menu() const { return pp_menu_; }
void WriteToMessage(IPC::Message* m) const;
- bool ReadFromMessage(const IPC::Message* m, PickleIterator* iter);
+ bool ReadFromMessage(const IPC::Message* m, base::PickleIterator* iter);
private:
const PP_Flash_Menu* pp_menu_;
diff --git a/ppapi/proxy/serialized_handle.h b/ppapi/proxy/serialized_handle.h
index 252ffcb..6e765fd 100644
--- a/ppapi/proxy/serialized_handle.h
+++ b/ppapi/proxy/serialized_handle.h
@@ -18,7 +18,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/proxy/ppapi_proxy_export.h"
+namespace base {
class Pickle;
+}
namespace ppapi {
namespace proxy {
@@ -129,8 +131,8 @@ class PPAPI_PROXY_EXPORT SerializedHandle {
// Write/Read a Header, which contains all the data except the handle. This
// allows us to write the handle in a platform-specific way, as is necessary
// in NaClIPCAdapter to share handles with NaCl from Windows.
- static bool WriteHeader(const Header& hdr, Pickle* pickle);
- static bool ReadHeader(PickleIterator* iter, Header* hdr);
+ static bool WriteHeader(const Header& hdr, base::Pickle* pickle);
+ static bool ReadHeader(base::PickleIterator* iter, Header* hdr);
private:
// The kind of handle we're holding.
diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h
index f3e114c..efefade 100644
--- a/ppapi/proxy/serialized_structs.h
+++ b/ppapi/proxy/serialized_structs.h
@@ -21,7 +21,6 @@
#include "ppapi/proxy/ppapi_proxy_export.h"
#include "ppapi/shared_impl/host_resource.h"
-class Pickle;
struct PP_FontDescription_Dev;
struct PP_BrowserFont_Trusted_Description;
diff --git a/ppapi/proxy/serialized_var.h b/ppapi/proxy/serialized_var.h
index 13052c9..d83b7d3 100644
--- a/ppapi/proxy/serialized_var.h
+++ b/ppapi/proxy/serialized_var.h
@@ -20,7 +20,9 @@
#include "ppapi/proxy/serialized_structs.h"
#include "ppapi/proxy/var_serialization_rules.h"
+namespace base {
class PickleIterator;
+}
namespace IPC {
class Message;
@@ -87,7 +89,7 @@ class PPAPI_PROXY_EXPORT SerializedVar {
const HandleWriter& handle_writer) const {
inner_->WriteDataToMessage(m, handle_writer);
}
- bool ReadFromMessage(const IPC::Message* m, PickleIterator* iter) {
+ bool ReadFromMessage(const IPC::Message* m, base::PickleIterator* iter) {
return inner_->ReadFromMessage(m, iter);
}
@@ -143,7 +145,7 @@ class PPAPI_PROXY_EXPORT SerializedVar {
void WriteToMessage(IPC::Message* m) const;
void WriteDataToMessage(IPC::Message* m,
const HandleWriter& handle_writer) const;
- bool ReadFromMessage(const IPC::Message* m, PickleIterator* iter);
+ bool ReadFromMessage(const IPC::Message* m, base::PickleIterator* iter);
// Sets the cleanup mode. See the CleanupMode enum below.
void SetCleanupModeToEndSendPassRef();