diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 21:58:02 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 21:58:02 +0000 |
commit | 4d2efd2e100bc961d3e19e0a6f242c7914917690 (patch) | |
tree | c29e1a627687c0ef29a207378ff19fcd9927fb67 /ppapi/proxy | |
parent | 6fa9e6f0c0fd3a66789de9df381cc16c36ca6da1 (diff) | |
download | chromium_src-4d2efd2e100bc961d3e19e0a6f242c7914917690.zip chromium_src-4d2efd2e100bc961d3e19e0a6f242c7914917690.tar.gz chromium_src-4d2efd2e100bc961d3e19e0a6f242c7914917690.tar.bz2 |
Convert the pp::proxy namespace to the ppapi::proxy namespace.
This is more consistent with the stuff in shared_impl, and removes a lot of
namespace using goop.
Add a unified resource tracker shared between the proxy and the impl.
This renames the old ResourceObjectBase to Resource and removes the old
PluginResource. It moves the resource tracker from the impl to the
shared_impl, and makes the proxy use it.
Some things become a little less neat because there's no proxy resource base
class. In particular GetDispatcher() is now gone. I considered whether to
add a helper base class that provides this function, but decided against it
and had individual resource classes implement this when their implementation
would find it useful. This is because ultimately I want more of this
functionality to move into the shared_impl, and it's easier to do that if
there are fewer proxy-specific things in the resources.
This changes the way that plugins are added to the tracker. Previously they
would only be in the tracker if the plugin had a reference to them, although
they could be alive if the impl had a scoped_ptr referencing an object. This
actually has the bug that if we then give the resource back to the plugin,
it wouldn't be refcounted properly and everything would get confused.
Now the tracker tracks all live resource objects whether or not the plugin
has a ref. This works basically like the var tracker (it would be nice if
the var and resource trackers shared more code, but that would further
complicate this already overcomplicated patch). The resource tracker takes an
extra ref whenever the plugin has one or more, and otherwise just tracks live
resources.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7655002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
145 files changed, 644 insertions, 789 deletions
diff --git a/ppapi/proxy/broker_dispatcher.cc b/ppapi/proxy/broker_dispatcher.cc index 087e9fc..0b39ae4 100644 --- a/ppapi/proxy/broker_dispatcher.cc +++ b/ppapi/proxy/broker_dispatcher.cc @@ -8,7 +8,7 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/proxy/ppapi_messages.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -110,4 +110,4 @@ void BrokerSideDispatcher::OnChannelError() { } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/broker_dispatcher.h b/ppapi/proxy/broker_dispatcher.h index 399bb87..6b907fb 100644 --- a/ppapi/proxy/broker_dispatcher.h +++ b/ppapi/proxy/broker_dispatcher.h @@ -8,7 +8,7 @@ #include "ppapi/c/trusted/ppp_broker.h" #include "ppapi/proxy/proxy_channel.h" -namespace pp { +namespace ppapi { namespace proxy { class BrokerDispatcher : public ProxyChannel { @@ -59,6 +59,6 @@ class BrokerSideDispatcher : public BrokerDispatcher { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_BROKER_DISPATCHER_H_ diff --git a/ppapi/proxy/callback_tracker.cc b/ppapi/proxy/callback_tracker.cc index 9806497..70b75d6 100644 --- a/ppapi/proxy/callback_tracker.cc +++ b/ppapi/proxy/callback_tracker.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -7,7 +7,7 @@ #include "ppapi/proxy/dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -69,4 +69,4 @@ void CallbackTracker::ReceiveExecuteSerializedCallback( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/callback_tracker.h b/ppapi/proxy/callback_tracker.h index 5f8233c1..90c324a 100644 --- a/ppapi/proxy/callback_tracker.h +++ b/ppapi/proxy/callback_tracker.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -10,7 +10,7 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_stdint.h" -namespace pp { +namespace ppapi { namespace proxy { class Dispatcher; @@ -61,6 +61,6 @@ class CallbackTracker { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_CALLBACK_TRACKER_H_ diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc index f8cc5b9..0432878 100644 --- a/ppapi/proxy/dispatcher.cc +++ b/ppapi/proxy/dispatcher.cc @@ -91,7 +91,7 @@ #include "ppapi/proxy/ppp_video_decoder_proxy.h" #include "ppapi/proxy/var_serialization_rules.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -283,4 +283,4 @@ void Dispatcher::AddIOThreadMessageFilter( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h index 348c91c..1c7ef38 100644 --- a/ppapi/proxy/dispatcher.h +++ b/ppapi/proxy/dispatcher.h @@ -21,10 +21,9 @@ #include "ppapi/proxy/plugin_var_tracker.h" namespace ppapi { + class WebKitForwarding; -} -namespace pp { namespace proxy { class VarSerializationRules; @@ -119,6 +118,6 @@ class Dispatcher : public ProxyChannel { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_DISPATCHER_H_ diff --git a/ppapi/proxy/enter_proxy.h b/ppapi/proxy/enter_proxy.h index d710c6c..6852780 100644 --- a/ppapi/proxy/enter_proxy.h +++ b/ppapi/proxy/enter_proxy.h @@ -12,7 +12,7 @@ #include "ppapi/proxy/plugin_resource_tracker.h" #include "ppapi/thunk/enter.h" -namespace pp { +namespace ppapi { namespace proxy { // Wrapper around EnterResourceNoLock that takes a host resource. This is used @@ -23,10 +23,10 @@ namespace proxy { // never logs errors since we assume the host is doing reasonable things. template<typename ResourceT> class EnterPluginFromHostResource - : public ::ppapi::thunk::EnterResourceNoLock<ResourceT> { + : public thunk::EnterResourceNoLock<ResourceT> { public: - EnterPluginFromHostResource(const ppapi::HostResource& host_resource) - : ::ppapi::thunk::EnterResourceNoLock<ResourceT>( + EnterPluginFromHostResource(const HostResource& host_resource) + : thunk::EnterResourceNoLock<ResourceT>( PluginResourceTracker::GetInstance()->PluginResourceForHostResource( host_resource), false) { @@ -40,10 +40,10 @@ class EnterPluginFromHostResource template<typename ResourceT> class EnterHostFromHostResource - : public ::ppapi::thunk::EnterResourceNoLock<ResourceT> { + : public thunk::EnterResourceNoLock<ResourceT> { public: - EnterHostFromHostResource(const ppapi::HostResource& host_resource) - : ::ppapi::thunk::EnterResourceNoLock<ResourceT>( + EnterHostFromHostResource(const HostResource& host_resource) + : thunk::EnterResourceNoLock<ResourceT>( host_resource.host_resource(), false) { // Validate that we're in the host rather than the plugin. Otherwise this // object will do the wrong thing. In the host, the instance should have @@ -91,7 +91,7 @@ class EnterHostFromHostResourceForceCallback // implementations will use the 1-extra-argument constructor below. template<class CallbackFactory, typename Method> EnterHostFromHostResourceForceCallback( - const ppapi::HostResource& host_resource, + const HostResource& host_resource, CallbackFactory& factory, Method method) : EnterHostFromHostResource<ResourceT>(host_resource), @@ -104,7 +104,7 @@ class EnterHostFromHostResourceForceCallback // For callbacks that take an extra parameter as a closure. template<class CallbackFactory, typename Method, typename A> EnterHostFromHostResourceForceCallback( - const ppapi::HostResource& host_resource, + const HostResource& host_resource, CallbackFactory& factory, Method method, const A& a) @@ -146,6 +146,6 @@ class EnterHostFromHostResourceForceCallback }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_ENTER_PROXY_H_ diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc index 40fc717..858b17b 100644 --- a/ppapi/proxy/host_dispatcher.cc +++ b/ppapi/proxy/host_dispatcher.cc @@ -14,7 +14,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/resource_creation_proxy.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -272,4 +272,4 @@ ScopedModuleReference::~ScopedModuleReference() { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h index 08d4dd6..ae514a9 100644 --- a/ppapi/proxy/host_dispatcher.h +++ b/ppapi/proxy/host_dispatcher.h @@ -27,10 +27,9 @@ class SyncChannel; } namespace ppapi { + struct Preferences; -} -namespace pp { namespace proxy { class InterfaceProxy; @@ -52,7 +51,7 @@ class HostDispatcher : public Dispatcher { virtual bool InitHostWithChannel(Delegate* delegate, const IPC::ChannelHandle& channel_handle, bool is_client, - const ppapi::Preferences& preferences); + const Preferences& preferences); // The host side maintains a mapping from PP_Instance to Dispatcher so // that we can send the messages to the right channel. @@ -121,8 +120,7 @@ class HostDispatcher : public Dispatcher { // Function proxies created for "new-style" FunctionGroups. // TODO(brettw) this is in progress. It should be merged with the target // proxies so there is one list to consult. - scoped_ptr< ::ppapi::FunctionGroupBase > - function_proxies_[INTERFACE_ID_COUNT]; + scoped_ptr<FunctionGroupBase> function_proxies_[INTERFACE_ID_COUNT]; // Guaranteed non-NULL. const PPB_Proxy_Private* ppb_proxy_; @@ -155,6 +153,6 @@ class ScopedModuleReference { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ diff --git a/ppapi/proxy/host_dispatcher_unittest.cc b/ppapi/proxy/host_dispatcher_unittest.cc index 14dfed5..25dfa5c 100644 --- a/ppapi/proxy/host_dispatcher_unittest.cc +++ b/ppapi/proxy/host_dispatcher_unittest.cc @@ -9,9 +9,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppapi_proxy_test.h" -using ppapi::HostResource; - -namespace pp { +namespace ppapi { namespace proxy { class HostDispatcherTest : public HostProxyTest { @@ -40,5 +38,5 @@ TEST_F(HostDispatcherTest, FAILS_PPBCreation) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/host_var_serialization_rules.cc b/ppapi/proxy/host_var_serialization_rules.cc index 2541f03..84e0b4c 100644 --- a/ppapi/proxy/host_var_serialization_rules.cc +++ b/ppapi/proxy/host_var_serialization_rules.cc @@ -7,7 +7,7 @@ #include "base/logging.h" #include "ppapi/c/ppb_var.h" -namespace pp { +namespace ppapi { namespace proxy { HostVarSerializationRules::HostVarSerializationRules( @@ -93,4 +93,4 @@ void HostVarSerializationRules::ReleaseObjectRef(const PP_Var& var) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/host_var_serialization_rules.h b/ppapi/proxy/host_var_serialization_rules.h index 4b6f63d..478a872 100644 --- a/ppapi/proxy/host_var_serialization_rules.h +++ b/ppapi/proxy/host_var_serialization_rules.h @@ -11,7 +11,7 @@ struct PPB_Var; -namespace pp { +namespace ppapi { namespace proxy { class VarTracker; @@ -48,6 +48,6 @@ class HostVarSerializationRules : public VarSerializationRules { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_ diff --git a/ppapi/proxy/interface_id.h b/ppapi/proxy/interface_id.h index 7cfe468..c909806 100644 --- a/ppapi/proxy/interface_id.h +++ b/ppapi/proxy/interface_id.h @@ -5,7 +5,7 @@ #ifndef PPAPI_PROXY_INTERFACE_ID_H_ #define PPAPI_PROXY_INTERFACE_ID_H_ -namespace pp { +namespace ppapi { namespace proxy { // These numbers must be all small integers. They are used in a lookup table @@ -70,6 +70,6 @@ enum InterfaceID { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_INTERFACE_ID_H_ diff --git a/ppapi/proxy/interface_proxy.cc b/ppapi/proxy/interface_proxy.cc index 7561d5e..a474383 100644 --- a/ppapi/proxy/interface_proxy.cc +++ b/ppapi/proxy/interface_proxy.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -7,7 +7,7 @@ #include "base/logging.h" #include "ppapi/proxy/dispatcher.h" -namespace pp { +namespace ppapi { namespace proxy { InterfaceProxy::InterfaceProxy(Dispatcher* dispatcher, @@ -33,4 +33,4 @@ PP_CompletionCallback InterfaceProxy::ReceiveCallback( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/interface_proxy.h b/ppapi/proxy/interface_proxy.h index 3b16f9e..1fed704 100644 --- a/ppapi/proxy/interface_proxy.h +++ b/ppapi/proxy/interface_proxy.h @@ -13,7 +13,7 @@ #include "ppapi/c/pp_var.h" #include "ppapi/proxy/interface_id.h" -namespace pp { +namespace ppapi { namespace proxy { class Dispatcher; @@ -73,7 +73,7 @@ class InterfaceProxy : public IPC::Channel::Listener, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_INTERFACE_PROXY_H_ diff --git a/ppapi/proxy/mock_resource.cc b/ppapi/proxy/mock_resource.cc index 2173eea..06b2292 100644 --- a/ppapi/proxy/mock_resource.cc +++ b/ppapi/proxy/mock_resource.cc @@ -1,13 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "ppapi/proxy/mock_resource.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { MockResource::MockResource(const HostResource& resource) : Resource(resource) { @@ -17,4 +14,4 @@ MockResource::~MockResource() { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/mock_resource.h b/ppapi/proxy/mock_resource.h index a886c20..768929d 100644 --- a/ppapi/proxy/mock_resource.h +++ b/ppapi/proxy/mock_resource.h @@ -8,7 +8,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/shared_impl/resource.h" -namespace pp { +namespace ppapi { namespace proxy { class MockResource : public ppapi::Resource { @@ -21,6 +21,6 @@ class MockResource : public ppapi::Resource { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_MOCK_RESOURCE_H_ diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc index fea4de6..7412462 100644 --- a/ppapi/proxy/plugin_dispatcher.cc +++ b/ppapi/proxy/plugin_dispatcher.cc @@ -32,9 +32,7 @@ #include "ipc/ipc_channel_posix.h" #endif -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -56,8 +54,7 @@ PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle, // GetInterface call or name for it, so we insert it into our table now. target_proxies_[INTERFACE_ID_PPP_CLASS].reset(new PPP_Class_Proxy(this)); - ::ppapi::TrackerBase::Init( - &PluginResourceTracker::GetTrackerBaseInstance); + TrackerBase::Init(&PluginResourceTracker::GetTrackerBaseInstance); } PluginDispatcher::~PluginDispatcher() { @@ -233,13 +230,12 @@ bool PluginDispatcher::SendToBrowser(IPC::Message* msg) { return plugin_delegate_->SendToBrowser(msg); } -ppapi::WebKitForwarding* PluginDispatcher::GetWebKitForwarding() { +WebKitForwarding* PluginDispatcher::GetWebKitForwarding() { return plugin_delegate_->GetWebKitForwarding(); } -::ppapi::FunctionGroupBase* PluginDispatcher::GetFunctionAPI( - pp::proxy::InterfaceID id) { - scoped_ptr< ::ppapi::FunctionGroupBase >& proxy = function_proxies_[id]; +FunctionGroupBase* PluginDispatcher::GetFunctionAPI(InterfaceID id) { + scoped_ptr<FunctionGroupBase >& proxy = function_proxies_[id]; if (proxy.get()) return proxy.get(); @@ -302,7 +298,7 @@ void PluginDispatcher::OnMsgSupportsInterface( *result = true; } -void PluginDispatcher::OnMsgSetPreferences(const ::ppapi::Preferences& prefs) { +void PluginDispatcher::OnMsgSetPreferences(const Preferences& prefs) { // The renderer may send us preferences more than once (currently this // happens every time a new plugin instance is created). Since we don't have // a way to signal to the plugin that the preferences have changed, changing @@ -317,4 +313,4 @@ void PluginDispatcher::OnMsgSetPreferences(const ::ppapi::Preferences& prefs) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h index b2fbeec..3490bc0 100644 --- a/ppapi/proxy/plugin_dispatcher.h +++ b/ppapi/proxy/plugin_dispatcher.h @@ -25,11 +25,10 @@ class WaitableEvent; } namespace ppapi { + struct Preferences; class Resource; -} -namespace pp { namespace proxy { // Used to keep track of per-instance data. @@ -51,7 +50,7 @@ class PluginDispatcher : public Dispatcher { // Returns the WebKit forwarding object used to make calls into WebKit. // Necessary only on the plugin side. - virtual ppapi::WebKitForwarding* GetWebKitForwarding() = 0; + virtual WebKitForwarding* GetWebKitForwarding() = 0; // Posts the given task to the WebKit thread associated with this plugin // process. The WebKit thread should be lazily created if it does not @@ -87,7 +86,7 @@ class PluginDispatcher : public Dispatcher { // Same as GetForInstance but retrieves the instance from the given resource // object as a convenience. Returns NULL on failure. - static PluginDispatcher* GetForResource(const ppapi::Resource* resource); + static PluginDispatcher* GetForResource(const Resource* resource); static const void* GetInterfaceFromDispatcher(const char* interface); @@ -123,17 +122,16 @@ class PluginDispatcher : public Dispatcher { bool SendToBrowser(IPC::Message* msg); // Returns the WebKitForwarding object used to forward events to WebKit. - ppapi::WebKitForwarding* GetWebKitForwarding(); + WebKitForwarding* GetWebKitForwarding(); // Returns the Preferences. - const ppapi::Preferences& preferences() const { return preferences_; } + const Preferences& preferences() const { return preferences_; } // Returns the "new-style" function API for the given interface ID, creating // it if necessary. // TODO(brettw) this is in progress. It should be merged with the target // proxies so there is one list to consult. - ppapi::FunctionGroupBase* GetFunctionAPI( - pp::proxy::InterfaceID id); + FunctionGroupBase* GetFunctionAPI(InterfaceID id); uint32 plugin_dispatcher_id() const { return plugin_dispatcher_id_; } @@ -146,7 +144,7 @@ class PluginDispatcher : public Dispatcher { // IPC message handlers. void OnMsgSupportsInterface(const std::string& interface_name, bool* result); - void OnMsgSetPreferences(const ::ppapi::Preferences& prefs); + void OnMsgSetPreferences(const Preferences& prefs); PluginDelegate* plugin_delegate_; @@ -157,8 +155,7 @@ class PluginDispatcher : public Dispatcher { // Function proxies created for "new-style" FunctionGroups. // TODO(brettw) this is in progress. It should be merged with the target // proxies so there is one list to consult. - scoped_ptr< ::ppapi::FunctionGroupBase > - function_proxies_[INTERFACE_ID_COUNT]; + scoped_ptr<FunctionGroupBase> function_proxies_[INTERFACE_ID_COUNT]; typedef base::hash_map<PP_Instance, InstanceData> InstanceDataMap; InstanceDataMap instance_map_; @@ -166,7 +163,7 @@ class PluginDispatcher : public Dispatcher { // The preferences sent from the host. We only want to set this once, which // is what the received_preferences_ indicates. See OnMsgSetPreferences. bool received_preferences_; - ppapi::Preferences preferences_; + Preferences preferences_; uint32 plugin_dispatcher_id_; @@ -174,6 +171,6 @@ class PluginDispatcher : public Dispatcher { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ diff --git a/ppapi/proxy/plugin_dispatcher_unittest.cc b/ppapi/proxy/plugin_dispatcher_unittest.cc index d68fc58..56f563b 100644 --- a/ppapi/proxy/plugin_dispatcher_unittest.cc +++ b/ppapi/proxy/plugin_dispatcher_unittest.cc @@ -9,9 +9,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppapi_proxy_test.h" -using ppapi::HostResource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -87,5 +85,5 @@ TEST_F(PluginDispatcherTest, PPBCreation) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_message_filter.cc b/ppapi/proxy/plugin_message_filter.cc index 9df2208..9f178f1 100644 --- a/ppapi/proxy/plugin_message_filter.cc +++ b/ppapi/proxy/plugin_message_filter.cc @@ -6,7 +6,7 @@ #include "ppapi/proxy/ppapi_messages.h" -namespace pp { +namespace ppapi { namespace proxy { PluginMessageFilter::PluginMessageFilter( @@ -58,4 +58,4 @@ void PluginMessageFilter::OnMsgReserveInstanceId(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_message_filter.h b/ppapi/proxy/plugin_message_filter.h index fa3b2f4..10f45c8 100644 --- a/ppapi/proxy/plugin_message_filter.h +++ b/ppapi/proxy/plugin_message_filter.h @@ -11,7 +11,7 @@ #include "ipc/ipc_message.h" #include "ppapi/c/pp_instance.h" -namespace pp { +namespace ppapi { namespace proxy { // Listens for messages on the I/O thread of the plugin and handles some of @@ -51,6 +51,6 @@ class PluginMessageFilter : public IPC::ChannelProxy::MessageFilter, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ diff --git a/ppapi/proxy/plugin_resource_tracker.cc b/ppapi/proxy/plugin_resource_tracker.cc index ac4621e..9f19d25 100644 --- a/ppapi/proxy/plugin_resource_tracker.cc +++ b/ppapi/proxy/plugin_resource_tracker.cc @@ -13,10 +13,7 @@ #include "ppapi/shared_impl/tracker_base.h" #include "ppapi/shared_impl/var.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -24,7 +21,7 @@ namespace { // When non-NULL, this object overrides the ResourceTrackerSingleton. PluginResourceTracker* g_resource_tracker_override = NULL; -::ppapi::TrackerBase* GetTrackerBase() { +TrackerBase* GetTrackerBase() { return PluginResourceTracker::GetInstance(); } @@ -50,8 +47,7 @@ PluginResourceTracker* PluginResourceTracker::GetInstance() { } // static -::ppapi::TrackerBase* -PluginResourceTracker::GetTrackerBaseInstance() { +TrackerBase* PluginResourceTracker::GetTrackerBaseInstance() { return GetInstance(); } @@ -63,20 +59,19 @@ PP_Resource PluginResourceTracker::PluginResourceForHostResource( return found->second; } -::ppapi::FunctionGroupBase* PluginResourceTracker::GetFunctionAPI( - PP_Instance inst, - pp::proxy::InterfaceID id) { +FunctionGroupBase* PluginResourceTracker::GetFunctionAPI(PP_Instance inst, + InterfaceID id) { PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(inst); if (dispatcher) return dispatcher->GetFunctionAPI(id); return NULL; } -ppapi::VarTracker* PluginResourceTracker::GetVarTracker() { +VarTracker* PluginResourceTracker::GetVarTracker() { return &var_tracker(); } -ppapi::ResourceTracker* PluginResourceTracker::GetResourceTracker() { +ResourceTracker* PluginResourceTracker::GetResourceTracker() { return this; } @@ -112,4 +107,4 @@ void PluginResourceTracker::RemoveResource(Resource* object) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_resource_tracker.h b/ppapi/proxy/plugin_resource_tracker.h index ccc6d70..d45ef6d 100644 --- a/ppapi/proxy/plugin_resource_tracker.h +++ b/ppapi/proxy/plugin_resource_tracker.h @@ -22,16 +22,14 @@ template<typename T> struct DefaultSingletonTraits; namespace ppapi { + class Var; -} -namespace pp { namespace proxy { class PluginDispatcher; -class PluginResourceTracker : public ppapi::TrackerBase, - public ppapi::ResourceTracker { +class PluginResourceTracker : public TrackerBase, public ResourceTracker { public: // Called by tests that want to specify a specific ResourceTracker. This // allows them to use a unique one each time and avoids singletons sticking @@ -40,12 +38,12 @@ class PluginResourceTracker : public ppapi::TrackerBase, // Returns the global singleton resource tracker for the plugin. static PluginResourceTracker* GetInstance(); - static ::ppapi::TrackerBase* GetTrackerBaseInstance(); + static TrackerBase* GetTrackerBaseInstance(); // Given a host resource, maps it to an existing plugin resource ID if it // exists, or returns 0 on failure. PP_Resource PluginResourceForHostResource( - const ppapi::HostResource& resource) const; + const HostResource& resource) const; PluginVarTracker& var_tracker() { return var_tracker_test_override_ ? *var_tracker_test_override_ @@ -57,16 +55,15 @@ class PluginResourceTracker : public ppapi::TrackerBase, } // TrackerBase. - virtual ppapi::FunctionGroupBase* GetFunctionAPI( - PP_Instance inst, - pp::proxy::InterfaceID id) OVERRIDE; - virtual ppapi::VarTracker* GetVarTracker() OVERRIDE; - virtual ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; + virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, + InterfaceID id) OVERRIDE; + virtual VarTracker* GetVarTracker() OVERRIDE; + virtual ResourceTracker* GetResourceTracker() OVERRIDE; protected: // ResourceTracker overrides. - virtual PP_Resource AddResource(ppapi::Resource* object) OVERRIDE; - virtual void RemoveResource(ppapi::Resource* object) OVERRIDE; + virtual PP_Resource AddResource(Resource* object) OVERRIDE; + virtual void RemoveResource(Resource* object) OVERRIDE; private: friend struct DefaultSingletonTraits<PluginResourceTracker>; @@ -88,13 +85,13 @@ class PluginResourceTracker : public ppapi::TrackerBase, PluginVarTracker* var_tracker_test_override_; // Map of host instance/resource pairs to a plugin resource ID. - typedef std::map<ppapi::HostResource, PP_Resource> HostResourceMap; + typedef std::map<HostResource, PP_Resource> HostResourceMap; HostResourceMap host_resource_map_; DISALLOW_COPY_AND_ASSIGN(PluginResourceTracker); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PLUGIN_RESOURCE_TRACKER_H_ diff --git a/ppapi/proxy/plugin_resource_tracker_unittest.cc b/ppapi/proxy/plugin_resource_tracker_unittest.cc index cb26638..59b64db 100644 --- a/ppapi/proxy/plugin_resource_tracker_unittest.cc +++ b/ppapi/proxy/plugin_resource_tracker_unittest.cc @@ -10,9 +10,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppapi_proxy_test.h" -using ppapi::HostResource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -67,4 +65,4 @@ TEST_F(PluginResourceTrackerTest, PluginResourceForHostResource) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_var_serialization_rules.cc b/ppapi/proxy/plugin_var_serialization_rules.cc index 8140969..f514773 100644 --- a/ppapi/proxy/plugin_var_serialization_rules.cc +++ b/ppapi/proxy/plugin_var_serialization_rules.cc @@ -10,9 +10,7 @@ #include "ppapi/proxy/plugin_var_tracker.h" #include "ppapi/shared_impl/var.h" -using ppapi::StringVar; - -namespace pp { +namespace ppapi { namespace proxy { PluginVarSerializationRules::PluginVarSerializationRules() @@ -144,4 +142,4 @@ void PluginVarSerializationRules::ReleaseObjectRef(const PP_Var& var) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_var_serialization_rules.h b/ppapi/proxy/plugin_var_serialization_rules.h index e073602..6bd9638 100644 --- a/ppapi/proxy/plugin_var_serialization_rules.h +++ b/ppapi/proxy/plugin_var_serialization_rules.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "ppapi/proxy/var_serialization_rules.h" -namespace pp { +namespace ppapi { namespace proxy { class PluginVarTracker; @@ -41,6 +41,6 @@ class PluginVarSerializationRules : public VarSerializationRules { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PLUGIN_VAR_SERIALIZATION_RULES_H_ diff --git a/ppapi/proxy/plugin_var_tracker.cc b/ppapi/proxy/plugin_var_tracker.cc index 0c834a5..ad8a844 100644 --- a/ppapi/proxy/plugin_var_tracker.cc +++ b/ppapi/proxy/plugin_var_tracker.cc @@ -13,10 +13,7 @@ #include "ppapi/proxy/proxy_object_var.h" #include "ppapi/shared_impl/var.h" -using ppapi::ProxyObjectVar; -using ppapi::Var; - -namespace pp { +namespace ppapi { namespace proxy { PluginVarTracker::HostVar::HostVar(PluginDispatcher* d, int32 i) @@ -276,4 +273,4 @@ scoped_refptr<ProxyObjectVar> PluginVarTracker::FindOrMakePluginVarFromHostVar( } } // namesace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/plugin_var_tracker.h b/ppapi/proxy/plugin_var_tracker.h index c6f3c93..09c7c21 100644 --- a/ppapi/proxy/plugin_var_tracker.h +++ b/ppapi/proxy/plugin_var_tracker.h @@ -20,16 +20,15 @@ struct PPB_Var; template<typename T> struct DefaultSingletonTraits; namespace ppapi { + class ProxyObjectVar; -} -namespace pp { namespace proxy { class PluginDispatcher; // Tracks live strings and objects in the plugin process. -class PluginVarTracker : public ppapi::VarTracker { +class PluginVarTracker : public VarTracker { public: PluginVarTracker(); ~PluginVarTracker(); @@ -66,7 +65,7 @@ class PluginVarTracker : public ppapi::VarTracker { protected: // VarTracker protected overrides. - virtual int32 AddVarInternal(::ppapi::Var* var, AddVarRefMode mode) OVERRIDE; + virtual int32 AddVarInternal(Var* var, AddVarRefMode mode) OVERRIDE; virtual void TrackedObjectGettingOneRef(VarMap::const_iterator iter) OVERRIDE; virtual void ObjectGettingZeroRef(VarMap::iterator iter) OVERRIDE; virtual bool DeleteObjectInfoIfNecessary(VarMap::iterator iter) OVERRIDE; @@ -96,16 +95,16 @@ class PluginVarTracker : public ppapi::VarTracker { // count, so in the creation case the refcount will be 0. It's assumed in // this case the caller will either adjust the refcount or the // track_with_no_reference_count. - PP_Var GetOrCreateObjectVarID(ppapi::ProxyObjectVar* object); + PP_Var GetOrCreateObjectVarID(ProxyObjectVar* object); // Sends an addref or release message to the browser for the given object ID. - void SendAddRefObjectMsg(const ppapi::ProxyObjectVar& proxy_object); - void SendReleaseObjectMsg(const ppapi::ProxyObjectVar& proxy_object); + void SendAddRefObjectMsg(const ProxyObjectVar& proxy_object); + void SendReleaseObjectMsg(const ProxyObjectVar& proxy_object); // Looks up the given host var. If we already know about it, returns a // reference to the already-tracked object. If it doesn't creates a new one // and returns it. If it's created, it's not added to the map. - scoped_refptr<ppapi::ProxyObjectVar> FindOrMakePluginVarFromHostVar( + scoped_refptr<ProxyObjectVar> FindOrMakePluginVarFromHostVar( const PP_Var& var, PluginDispatcher* dispatcher); @@ -117,6 +116,6 @@ class PluginVarTracker : public ppapi::VarTracker { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ diff --git a/ppapi/proxy/plugin_var_tracker_unittest.cc b/ppapi/proxy/plugin_var_tracker_unittest.cc index 01954db..ce2014f 100644 --- a/ppapi/proxy/plugin_var_tracker_unittest.cc +++ b/ppapi/proxy/plugin_var_tracker_unittest.cc @@ -7,7 +7,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppapi_proxy_test.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -161,4 +161,4 @@ TEST_F(PluginVarTrackerTest, RecursiveTrackWithNoRef) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index 24dd61c..16e272f 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -78,13 +78,13 @@ IPC_STRUCT_TRAITS_BEGIN(PP_VideoCaptureDeviceInfo_Dev) IPC_STRUCT_TRAITS_MEMBER(frames_per_second) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(pp::proxy::PPPVideoCapture_Buffer) +IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::PPPVideoCapture_Buffer) IPC_STRUCT_TRAITS_MEMBER(resource) IPC_STRUCT_TRAITS_MEMBER(handle) IPC_STRUCT_TRAITS_MEMBER(size) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(::ppapi::Preferences) +IPC_STRUCT_TRAITS_BEGIN(ppapi::Preferences) IPC_STRUCT_TRAITS_MEMBER(standard_font_family) IPC_STRUCT_TRAITS_MEMBER(fixed_font_family) IPC_STRUCT_TRAITS_MEMBER(serif_font_family) @@ -93,7 +93,7 @@ IPC_STRUCT_TRAITS_BEGIN(::ppapi::Preferences) IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(::ppapi::InputEventData) +IPC_STRUCT_TRAITS_BEGIN(ppapi::InputEventData) IPC_STRUCT_TRAITS_MEMBER(is_filtered) IPC_STRUCT_TRAITS_MEMBER(event_type) IPC_STRUCT_TRAITS_MEMBER(event_time_stamp) @@ -138,7 +138,7 @@ IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_ReserveInstanceId, // Passes the WebKit preferences to the plugin. IPC_MESSAGE_CONTROL1(PpapiMsg_SetPreferences, - ::ppapi::Preferences) + ppapi::Preferences) // Network state notification from the browser for implementing // PPP_NetworkState_Dev. @@ -189,7 +189,7 @@ IPC_MESSAGE_ROUTED3( PpapiMsg_PPBFileChooser_ChooseComplete, ppapi::HostResource /* chooser */, int32_t /* result_code (will be != PP_OK on failure */, - std::vector<pp::proxy::PPBFileRef_CreateInfo> /* chosen_files */) + std::vector<ppapi::proxy::PPBFileRef_CreateInfo> /* chosen_files */) // PPB_FileSystem. IPC_MESSAGE_ROUTED2( @@ -246,50 +246,50 @@ IPC_MESSAGE_ROUTED2(PpapiMsg_PPBSurface3D_SwapBuffersACK, IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty, int64 /* ppp_class */, int64 /* object */, - pp::proxy::SerializedVar /* property */, - pp::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* property */, + ppapi::proxy::SerializedVar /* out_exception */, bool /* result */) IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod, int64 /* ppp_class */, int64 /* object */, - pp::proxy::SerializedVar /* method */, - pp::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* method */, + ppapi::proxy::SerializedVar /* out_exception */, bool /* result */) IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty, int64 /* ppp_class */, int64 /* object */, - pp::proxy::SerializedVar /* property */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* property */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties, int64 /* ppp_class */, int64 /* object */, - std::vector<pp::proxy::SerializedVar> /* props */, - pp::proxy::SerializedVar /* out_exception */) + std::vector<ppapi::proxy::SerializedVar> /* props */, + ppapi::proxy::SerializedVar /* out_exception */) IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty, int64 /* ppp_class */, int64 /* object */, - pp::proxy::SerializedVar /* name */, - pp::proxy::SerializedVar /* value */, - pp::proxy::SerializedVar /* out_exception */) + ppapi::proxy::SerializedVar /* name */, + ppapi::proxy::SerializedVar /* value */, + ppapi::proxy::SerializedVar /* out_exception */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty, int64 /* ppp_class */, int64 /* object */, - pp::proxy::SerializedVar /* property */, - pp::proxy::SerializedVar /* out_exception */) + ppapi::proxy::SerializedVar /* property */, + ppapi::proxy::SerializedVar /* out_exception */) IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call, int64 /* ppp_class */, int64 /* object */, - pp::proxy::SerializedVar /* method_name */, - std::vector<pp::proxy::SerializedVar> /* args */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* method_name */, + std::vector<ppapi::proxy::SerializedVar> /* args */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct, int64 /* ppp_class */, int64 /* object */, - std::vector<pp::proxy::SerializedVar> /* args */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + std::vector<ppapi::proxy::SerializedVar> /* args */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate, int64 /* ppp_class */, int64 /* object */) @@ -331,17 +331,17 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInstance_HandleDocumentLoad, // PPP_Instance_Private. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPInstancePrivate_GetInstanceObject, PP_Instance /* instance */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) // PPP_Messaging. IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage, PP_Instance /* instance */, - pp::proxy::SerializedVar /* message */) + ppapi::proxy::SerializedVar /* message */) // PPB_URLLoader // (Messages from browser to plugin to notify it of changes in state.) IPC_MESSAGE_ROUTED1(PpapiMsg_PPBURLLoader_UpdateProgress, - pp::proxy::PPBURLLoader_UpdateProgress_Params /* params */) + ppapi::proxy::PPBURLLoader_UpdateProgress_Params /* params */) IPC_MESSAGE_ROUTED3(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack, ppapi::HostResource /* loader */, int32 /* result */, @@ -352,7 +352,7 @@ IPC_MESSAGE_ROUTED3( PpapiMsg_PPPVideoCapture_OnDeviceInfo, ppapi::HostResource /* video_capture */, PP_VideoCaptureDeviceInfo_Dev /* info */, - std::vector<pp::proxy::PPPVideoCapture_Buffer> /* buffers */) + std::vector<ppapi::proxy::PPPVideoCapture_Buffer> /* buffers */) IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoCapture_OnStatus, ppapi::HostResource /* video_capture */, uint32_t /* status */) @@ -431,12 +431,12 @@ IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBBuffer_Create, IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBConsole_Log, PP_Instance /* instance */, int /* log_level */, - pp::proxy::SerializedVar /* value */) + ppapi::proxy::SerializedVar /* value */) IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBConsole_LogWithSource, PP_Instance /* instance */, int /* log_level */, - pp::proxy::SerializedVar /* soruce */, - pp::proxy::SerializedVar /* value */) + ppapi::proxy::SerializedVar /* soruce */, + ppapi::proxy::SerializedVar /* value */) // PPB_Context3D. IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBContext3D_Create, @@ -494,7 +494,7 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, // PPB_CharSet. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBCharSet_GetDefaultCharSet, PP_Instance /* instance */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) // PPB_CursorControl. IPC_SYNC_MESSAGE_ROUTED4_1(PpapiHostMsg_PPBCursorControl_SetCursor, @@ -530,10 +530,10 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBFileChooser_Show, IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFileRef_Create, ppapi::HostResource /* file_system */, std::string /* path */, - pp::proxy::PPBFileRef_CreateInfo /* result */) + ppapi::proxy::PPBFileRef_CreateInfo /* result */) IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFileRef_GetParent, ppapi::HostResource /* file_ref */, - pp::proxy::PPBFileRef_CreateInfo /* result */) + ppapi::proxy::PPBFileRef_CreateInfo /* result */) IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBFileRef_MakeDirectory, ppapi::HostResource /* file_ref */, PP_Bool /* make_ancestors */, @@ -567,12 +567,12 @@ IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBFlash_SetInstanceAlwaysOnTop, // This has to be synchronous becuase the caller may want to composite on // top of the resulting text after the call is complete. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlash_DrawGlyphs, - pp::proxy::PPBFlash_DrawGlyphs_Params /* params */, + ppapi::proxy::PPBFlash_DrawGlyphs_Params /* params */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFlash_GetProxyForURL, PP_Instance /* instance */, std::string /* url */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBFlash_Navigate, ppapi::HostResource /* request_info */, std::string /* target */, @@ -596,11 +596,11 @@ IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBFlashClipboard_IsFormatAvailable, IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFlashClipboard_ReadPlainText, PP_Instance /* instance */, int /* clipboard_type */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBFlashClipboard_WritePlainText, PP_Instance /* instance */, int /* clipboard_type */, - pp::proxy::SerializedVar /* text */) + ppapi::proxy::SerializedVar /* text */) // PPB_Flash_File_FileRef. IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBFlashFile_FileRef_OpenFile, @@ -644,13 +644,13 @@ IPC_SYNC_MESSAGE_ROUTED2_2( PpapiHostMsg_PPBFlashFile_ModuleLocal_GetDirContents, PP_Instance /* instance */, std::string /* path */, - std::vector<pp::proxy::SerializedDirEntry> /* entries */, + std::vector<ppapi::proxy::SerializedDirEntry> /* entries */, int32_t /* result */) // PPB_Flash_Menu IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFlashMenu_Create, PP_Instance /* instance */, - pp::proxy::SerializedFlashMenu /* menu_data */, + ppapi::proxy::SerializedFlashMenu /* menu_data */, ppapi::HostResource /* result */) IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBFlashMenu_Show, ppapi::HostResource /* menu */, @@ -765,10 +765,10 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers, // PPB_Instance. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetWindowObject, PP_Instance /* instance */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetOwnerElementObject, PP_Instance /* instance */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_BindGraphics, PP_Instance /* instance */, ppapi::HostResource /* device */, @@ -778,9 +778,9 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_IsFullFrame, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript, PP_Instance /* instance */, - pp::proxy::SerializedVar /* script */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* script */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_SetFullscreen, PP_Instance /* instance */, PP_Bool /* fullscreen */, @@ -798,12 +798,12 @@ IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_ClearInputEvents, uint32_t /* event_classes */) IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PostMessage, PP_Instance /* instance */, - pp::proxy::SerializedVar /* message */) + ppapi::proxy::SerializedVar /* message */) IPC_SYNC_MESSAGE_ROUTED3_1( PpapiHostMsg_PPBPDF_GetFontFileWithFallback, PP_Instance /* instance */, - pp::proxy::SerializedFontDescription /* description */, + ppapi::proxy::SerializedFontDescription /* description */, int32_t /* charset */, ppapi::HostResource /* result */) IPC_SYNC_MESSAGE_ROUTED2_1( @@ -865,7 +865,7 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLRequestInfo_Create, IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBURLRequestInfo_SetProperty, ppapi::HostResource /* request */, int32_t /* property */, - pp::proxy::SerializedVar /* value */) + ppapi::proxy::SerializedVar /* value */) IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLRequestInfo_AppendDataToBody, ppapi::HostResource /* request */, std::string /* data */) @@ -880,19 +880,19 @@ IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBURLRequestInfo_AppendFileToBody, IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBURLResponseInfo_GetProperty, ppapi::HostResource /* response */, int32_t /* property */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLResponseInfo_GetBodyAsFileRef, ppapi::HostResource /* response */, - pp::proxy::PPBFileRef_CreateInfo /* result */) + ppapi::proxy::PPBFileRef_CreateInfo /* result */) // PPB_URLUtil. IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBURLUtil_ResolveRelativeToDocument, PP_Instance /* instance */, - pp::proxy::SerializedVar /* relative */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* relative */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBURLUtil_DocumentCanRequest, PP_Instance /* instance */, - pp::proxy::SerializedVar /* relative */, + ppapi::proxy::SerializedVar /* relative */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBURLUtil_DocumentCanAccessDocument, PP_Instance /* active */, @@ -900,10 +900,10 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBURLUtil_DocumentCanAccessDocument, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLUtil_GetDocumentURL, PP_Instance /* active */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLUtil_GetPluginInstanceURL, PP_Instance /* active */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) // PPB_Var. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject, @@ -913,52 +913,52 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject, int64 /* object_id */) IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_ConvertType, PP_Instance /* instance */, - pp::proxy::SerializedVar /* var */, + ppapi::proxy::SerializedVar /* var */, int /* new_type */, - pp::proxy::SerializedVar /* exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty, - pp::proxy::SerializedVar /* object */, - pp::proxy::SerializedVar /* property */, - pp::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* object */, + ppapi::proxy::SerializedVar /* property */, + ppapi::proxy::SerializedVar /* out_exception */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasMethodDeprecated, - pp::proxy::SerializedVar /* object */, - pp::proxy::SerializedVar /* method */, - pp::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* object */, + ppapi::proxy::SerializedVar /* method */, + ppapi::proxy::SerializedVar /* out_exception */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_GetProperty, - pp::proxy::SerializedVar /* object */, - pp::proxy::SerializedVar /* property */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* object */, + ppapi::proxy::SerializedVar /* property */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_DeleteProperty, - pp::proxy::SerializedVar /* object */, - pp::proxy::SerializedVar /* property */, - pp::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* object */, + ppapi::proxy::SerializedVar /* property */, + ppapi::proxy::SerializedVar /* out_exception */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBVar_EnumerateProperties, - pp::proxy::SerializedVar /* object */, - std::vector<pp::proxy::SerializedVar> /* props */, - pp::proxy::SerializedVar /* out_exception */) + ppapi::proxy::SerializedVar /* object */, + std::vector<ppapi::proxy::SerializedVar> /* props */, + ppapi::proxy::SerializedVar /* out_exception */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_SetPropertyDeprecated, - pp::proxy::SerializedVar /* object */, - pp::proxy::SerializedVar /* name */, - pp::proxy::SerializedVar /* value */, - pp::proxy::SerializedVar /* out_exception */) + ppapi::proxy::SerializedVar /* object */, + ppapi::proxy::SerializedVar /* name */, + ppapi::proxy::SerializedVar /* value */, + ppapi::proxy::SerializedVar /* out_exception */) IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_CallDeprecated, - pp::proxy::SerializedVar /* object */, - pp::proxy::SerializedVar /* method_name */, - std::vector<pp::proxy::SerializedVar> /* args */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* object */, + ppapi::proxy::SerializedVar /* method_name */, + std::vector<ppapi::proxy::SerializedVar> /* args */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_Construct, - pp::proxy::SerializedVar /* object */, - std::vector<pp::proxy::SerializedVar> /* args */, - pp::proxy::SerializedVar /* out_exception */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* object */, + std::vector<ppapi::proxy::SerializedVar> /* args */, + ppapi::proxy::SerializedVar /* out_exception */, + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated, - pp::proxy::SerializedVar /* var */, + ppapi::proxy::SerializedVar /* var */, int64 /* object_class */, int64 /* object-data */, PP_Bool /* result */) @@ -966,7 +966,7 @@ IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated, PP_Instance /* instance */, int64 /* object_class */, int64 /* object_data */, - pp::proxy::SerializedVar /* result */) + ppapi::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_ResourceCreation_Graphics2D, PP_Instance /* instance */, @@ -980,7 +980,7 @@ IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_ResourceCreation_ImageData, PP_Bool /* init_to_zero */, ppapi::HostResource /* result_resource */, std::string /* image_data_desc */, - pp::proxy::ImageHandle /* result */) + ppapi::proxy::ImageHandle /* result */) // PPB_VideoCapture_Dev. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVideoCapture_Create, diff --git a/ppapi/proxy/ppapi_param_traits.cc b/ppapi/proxy/ppapi_param_traits.cc index d8f6b70..0e3c6de 100644 --- a/ppapi/proxy/ppapi_param_traits.cc +++ b/ppapi/proxy/ppapi_param_traits.cc @@ -193,12 +193,12 @@ void ParamTraits<PP_ObjectProperty>::Log(const param_type& p, std::string* l) { // PPBFlash_DrawGlyphs_Params -------------------------------------------------- // static -void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Write( +void ParamTraits<ppapi::proxy::PPBFlash_DrawGlyphs_Params>::Write( Message* m, const param_type& p) { ParamTraits<PP_Instance>::Write(m, p.instance); ParamTraits<ppapi::HostResource>::Write(m, p.image_data); - ParamTraits<pp::proxy::SerializedFontDescription>::Write(m, p.font_desc); + ParamTraits<ppapi::proxy::SerializedFontDescription>::Write(m, p.font_desc); ParamTraits<uint32_t>::Write(m, p.color); ParamTraits<PP_Point>::Write(m, p.position); ParamTraits<PP_Rect>::Write(m, p.clip); @@ -216,14 +216,14 @@ void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Write( } // static -bool ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Read( +bool ParamTraits<ppapi::proxy::PPBFlash_DrawGlyphs_Params>::Read( const Message* m, void** iter, param_type* r) { return ParamTraits<PP_Instance>::Read(m, iter, &r->instance) && ParamTraits<ppapi::HostResource>::Read(m, iter, &r->image_data) && - ParamTraits<pp::proxy::SerializedFontDescription>::Read(m, iter, + ParamTraits<ppapi::proxy::SerializedFontDescription>::Read(m, iter, &r->font_desc) && ParamTraits<uint32_t>::Read(m, iter, &r->color) && ParamTraits<PP_Point>::Read(m, iter, &r->position) && @@ -243,7 +243,7 @@ bool ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Read( } // static -void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Log( +void ParamTraits<ppapi::proxy::PPBFlash_DrawGlyphs_Params>::Log( const param_type& p, std::string* l) { } @@ -251,28 +251,28 @@ void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Log( // PPBFileRef_CreateInfo ------------------------------------------------------- // static -void ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Write( +void ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo>::Write( Message* m, const param_type& p) { ParamTraits<ppapi::HostResource>::Write(m, p.resource); ParamTraits<int>::Write(m, p.file_system_type); - ParamTraits<pp::proxy::SerializedVar>::Write(m, p.path); - ParamTraits<pp::proxy::SerializedVar>::Write(m, p.name); + ParamTraits<ppapi::proxy::SerializedVar>::Write(m, p.path); + ParamTraits<ppapi::proxy::SerializedVar>::Write(m, p.name); } // static -bool ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Read(const Message* m, - void** iter, - param_type* r) { +bool ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo>::Read(const Message* m, + void** iter, + param_type* r) { return ParamTraits<ppapi::HostResource>::Read(m, iter, &r->resource) && ParamTraits<int>::Read(m, iter, &r->file_system_type) && - ParamTraits<pp::proxy::SerializedVar>::Read(m, iter, &r->path) && - ParamTraits<pp::proxy::SerializedVar>::Read(m, iter, &r->name); + ParamTraits<ppapi::proxy::SerializedVar>::Read(m, iter, &r->path) && + ParamTraits<ppapi::proxy::SerializedVar>::Read(m, iter, &r->name); } // static -void ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Log( +void ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo>::Log( const param_type& p, std::string* l) { } @@ -280,7 +280,7 @@ void ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Log( // PPBURLLoader_UpdateProgress_Params ------------------------------------------ // static -void ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params>::Write( +void ParamTraits<ppapi::proxy::PPBURLLoader_UpdateProgress_Params>::Write( Message* m, const param_type& p) { ParamTraits<PP_Instance>::Write(m, p.instance); @@ -292,7 +292,7 @@ void ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params>::Write( } // static -bool ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params>::Read( +bool ParamTraits<ppapi::proxy::PPBURLLoader_UpdateProgress_Params>::Read( const Message* m, void** iter, param_type* r) { @@ -306,7 +306,7 @@ bool ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params>::Read( } // static -void ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params>::Log( +void ParamTraits<ppapi::proxy::PPBURLLoader_UpdateProgress_Params>::Log( const param_type& p, std::string* l) { } @@ -314,32 +314,32 @@ void ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params>::Log( // SerializedDirEntry ---------------------------------------------------------- // static -void ParamTraits<pp::proxy::SerializedDirEntry>::Write(Message* m, - const param_type& p) { +void ParamTraits<ppapi::proxy::SerializedDirEntry>::Write(Message* m, + const param_type& p) { ParamTraits<std::string>::Write(m, p.name); ParamTraits<bool>::Write(m, p.is_dir); } // static -bool ParamTraits<pp::proxy::SerializedDirEntry>::Read(const Message* m, - void** iter, - param_type* r) { +bool ParamTraits<ppapi::proxy::SerializedDirEntry>::Read(const Message* m, + void** iter, + param_type* r) { return ParamTraits<std::string>::Read(m, iter, &r->name) && ParamTraits<bool>::Read(m, iter, &r->is_dir); } // static -void ParamTraits<pp::proxy::SerializedDirEntry>::Log(const param_type& p, - std::string* l) { +void ParamTraits<ppapi::proxy::SerializedDirEntry>::Log(const param_type& p, + std::string* l) { } -// pp::proxy::SerializedFontDescription ---------------------------------------- +// ppapi::proxy::SerializedFontDescription ------------------------------------- // static -void ParamTraits<pp::proxy::SerializedFontDescription>::Write( +void ParamTraits<ppapi::proxy::SerializedFontDescription>::Write( Message* m, const param_type& p) { - ParamTraits<pp::proxy::SerializedVar>::Write(m, p.face); + ParamTraits<ppapi::proxy::SerializedVar>::Write(m, p.face); ParamTraits<int32_t>::Write(m, p.family); ParamTraits<uint32_t>::Write(m, p.size); ParamTraits<int32_t>::Write(m, p.weight); @@ -350,12 +350,12 @@ void ParamTraits<pp::proxy::SerializedFontDescription>::Write( } // static -bool ParamTraits<pp::proxy::SerializedFontDescription>::Read( +bool ParamTraits<ppapi::proxy::SerializedFontDescription>::Read( const Message* m, void** iter, param_type* r) { return - ParamTraits<pp::proxy::SerializedVar>::Read(m, iter, &r->face) && + ParamTraits<ppapi::proxy::SerializedVar>::Read(m, iter, &r->face) && ParamTraits<int32_t>::Read(m, iter, &r->family) && ParamTraits<uint32_t>::Read(m, iter, &r->size) && ParamTraits<int32_t>::Read(m, iter, &r->weight) && @@ -366,7 +366,7 @@ bool ParamTraits<pp::proxy::SerializedFontDescription>::Read( } // static -void ParamTraits<pp::proxy::SerializedFontDescription>::Log( +void ParamTraits<ppapi::proxy::SerializedFontDescription>::Log( const param_type& p, std::string* l) { } @@ -401,33 +401,33 @@ void ParamTraits<ppapi::HostResource>::Log(const param_type& p, // SerializedVar --------------------------------------------------------------- // static -void ParamTraits<pp::proxy::SerializedVar>::Write(Message* m, - const param_type& p) { +void ParamTraits<ppapi::proxy::SerializedVar>::Write(Message* m, + const param_type& p) { p.WriteToMessage(m); } // static -bool ParamTraits<pp::proxy::SerializedVar>::Read(const Message* m, - void** iter, - param_type* r) { +bool ParamTraits<ppapi::proxy::SerializedVar>::Read(const Message* m, + void** iter, + param_type* r) { return r->ReadFromMessage(m, iter); } // static -void ParamTraits<pp::proxy::SerializedVar>::Log(const param_type& p, - std::string* l) { +void ParamTraits<ppapi::proxy::SerializedVar>::Log(const param_type& p, + std::string* l) { } // std::vector<SerializedVar> -------------------------------------------------- -void ParamTraits< std::vector<pp::proxy::SerializedVar> >::Write( +void ParamTraits< std::vector<ppapi::proxy::SerializedVar> >::Write( Message* m, const param_type& p) { WriteVectorWithoutCopy(m, p); } // static -bool ParamTraits< std::vector<pp::proxy::SerializedVar> >::Read( +bool ParamTraits< std::vector<ppapi::proxy::SerializedVar> >::Read( const Message* m, void** iter, param_type* r) { @@ -435,21 +435,21 @@ bool ParamTraits< std::vector<pp::proxy::SerializedVar> >::Read( } // static -void ParamTraits< std::vector<pp::proxy::SerializedVar> >::Log( +void ParamTraits< std::vector<ppapi::proxy::SerializedVar> >::Log( const param_type& p, std::string* l) { } // std::vector<PPBFileRef_CreateInfo> ------------------------------------------ -void ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> >::Write( +void ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> >::Write( Message* m, const param_type& p) { WriteVectorWithoutCopy(m, p); } // static -bool ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> >::Read( +bool ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> >::Read( const Message* m, void** iter, param_type* r) { @@ -457,7 +457,7 @@ bool ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> >::Read( } // static -void ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> >::Log( +void ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> >::Log( const param_type& p, std::string* l) { } @@ -465,21 +465,22 @@ void ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> >::Log( // SerializedFlashMenu --------------------------------------------------------- // static -void ParamTraits<pp::proxy::SerializedFlashMenu>::Write(Message* m, - const param_type& p) { +void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Write( + Message* m, + const param_type& p) { p.WriteToMessage(m); } // static -bool ParamTraits<pp::proxy::SerializedFlashMenu>::Read(const Message* m, - void** iter, - param_type* r) { +bool ParamTraits<ppapi::proxy::SerializedFlashMenu>::Read(const Message* m, + void** iter, + param_type* r) { return r->ReadFromMessage(m, iter); } // static -void ParamTraits<pp::proxy::SerializedFlashMenu>::Log(const param_type& p, - std::string* l) { +void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p, + std::string* l) { } } // namespace IPC diff --git a/ppapi/proxy/ppapi_param_traits.h b/ppapi/proxy/ppapi_param_traits.h index 4cd425a..b53d5f5 100644 --- a/ppapi/proxy/ppapi_param_traits.h +++ b/ppapi/proxy/ppapi_param_traits.h @@ -23,9 +23,6 @@ namespace ppapi { class HostResource; -} // namespace ppapi - -namespace pp { namespace proxy { struct PPBFileRef_CreateInfo; @@ -37,7 +34,7 @@ class SerializedFlashMenu; class SerializedVar; } // namespace proxy -} // namespace pp +} // namespace ppapi namespace IPC { @@ -74,40 +71,40 @@ struct ParamTraits<PP_ObjectProperty> { }; template<> -struct ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params> { - typedef pp::proxy::PPBFlash_DrawGlyphs_Params param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits<pp::proxy::PPBFileRef_CreateInfo> { - typedef pp::proxy::PPBFileRef_CreateInfo param_type; +struct ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo> { + typedef ppapi::proxy::PPBFileRef_CreateInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params> { - typedef pp::proxy::PPBURLLoader_UpdateProgress_Params param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits<pp::proxy::SerializedDirEntry> { - typedef pp::proxy::SerializedDirEntry param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits<pp::proxy::SerializedFontDescription> { - typedef pp::proxy::SerializedFontDescription param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); @@ -122,32 +119,32 @@ struct ParamTraits<ppapi::HostResource> { }; template<> -struct ParamTraits<pp::proxy::SerializedVar> { - typedef pp::proxy::SerializedVar param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits< std::vector<pp::proxy::SerializedVar> > { - typedef std::vector<pp::proxy::SerializedVar> param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> > { - typedef std::vector<pp::proxy::PPBFileRef_CreateInfo> param_type; +struct ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> > { + typedef std::vector<ppapi::proxy::PPBFileRef_CreateInfo> param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template<> -struct ParamTraits<pp::proxy::SerializedFlashMenu> { - typedef pp::proxy::SerializedFlashMenu param_type; +struct 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, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc index 8049330..34b108c 100644 --- a/ppapi/proxy/ppapi_proxy_test.cc +++ b/ppapi/proxy/ppapi_proxy_test.cc @@ -12,7 +12,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/ppapi_preferences.cc" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -375,4 +375,4 @@ void TwoWayTest::TearDown() { } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppapi_proxy_test.h b/ppapi/proxy/ppapi_proxy_test.h index 775b75c..0d3d506 100644 --- a/ppapi/proxy/ppapi_proxy_test.h +++ b/ppapi/proxy/ppapi_proxy_test.h @@ -17,7 +17,7 @@ #include "ppapi/proxy/plugin_var_tracker.h" #include "testing/gtest/include/gtest/gtest.h" -namespace pp { +namespace ppapi { namespace proxy { // Base class for plugin and host test harnesses. Tests will not use this @@ -240,4 +240,4 @@ class TwoWayTest : public testing::Test { }; } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_audio_config_proxy.cc b/ppapi/proxy/ppb_audio_config_proxy.cc index eeb4907..5f063e3 100644 --- a/ppapi/proxy/ppb_audio_config_proxy.cc +++ b/ppapi/proxy/ppb_audio_config_proxy.cc @@ -10,21 +10,18 @@ #include "ppapi/shared_impl/audio_config_impl.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { // The implementation is actually in AudioConfigImpl. -class AudioConfig : public Resource, public ppapi::AudioConfigImpl { +class AudioConfig : public Resource, public AudioConfigImpl { public: // Note that you must call Init (on AudioConfigImpl) before using this class. AudioConfig(const HostResource& resource); virtual ~AudioConfig(); // Resource overrides. - virtual ::ppapi::thunk::PPB_AudioConfig_API* AsPPB_AudioConfig_API() OVERRIDE; + virtual thunk::PPB_AudioConfig_API* AsPPB_AudioConfig_API() OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(AudioConfig); @@ -36,7 +33,7 @@ AudioConfig::AudioConfig(const HostResource& resource) : Resource(resource) { AudioConfig::~AudioConfig() { } -::ppapi::thunk::PPB_AudioConfig_API* AudioConfig::AsPPB_AudioConfig_API() { +thunk::PPB_AudioConfig_API* AudioConfig::AsPPB_AudioConfig_API() { return this; } @@ -60,7 +57,7 @@ PPB_AudioConfig_Proxy::~PPB_AudioConfig_Proxy() { // static const InterfaceProxy::Info* PPB_AudioConfig_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_AudioConfig_Thunk(), + thunk::GetPPB_AudioConfig_Thunk(), PPB_AUDIO_CONFIG_INTERFACE, INTERFACE_ID_PPB_AUDIO_CONFIG, false, @@ -88,4 +85,4 @@ bool PPB_AudioConfig_Proxy::OnMessageReceived(const IPC::Message& msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_audio_config_proxy.h b/ppapi/proxy/ppb_audio_config_proxy.h index 5bbfa30..de86d28 100644 --- a/ppapi/proxy/ppb_audio_config_proxy.h +++ b/ppapi/proxy/ppb_audio_config_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -13,7 +13,7 @@ struct PPB_AudioConfig; -namespace pp { +namespace ppapi { namespace proxy { class PPB_AudioConfig_Proxy : public InterfaceProxy { @@ -35,6 +35,6 @@ class PPB_AudioConfig_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc index d9f5d60..aa3c42e 100644 --- a/ppapi/proxy/ppb_audio_proxy.cc +++ b/ppapi/proxy/ppb_audio_proxy.cc @@ -22,16 +22,14 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Audio_API; using ppapi::thunk::PPB_AudioConfig_API; -namespace pp { +namespace ppapi { namespace proxy { -class Audio : public Resource, public ppapi::AudioImpl { +class Audio : public Resource, public AudioImpl { public: Audio(const HostResource& audio_id, PP_Resource config_id, @@ -149,7 +147,7 @@ PPB_Audio_Proxy::~PPB_Audio_Proxy() { // static const InterfaceProxy::Info* PPB_Audio_Proxy::GetInfo() { static const Info info = { - ppapi::thunk::GetPPB_Audio_Thunk(), + thunk::GetPPB_Audio_Thunk(), PPB_AUDIO_INTERFACE, INTERFACE_ID_PPB_AUDIO, false, @@ -180,8 +178,8 @@ PP_Resource PPB_Audio_Proxy::CreateProxyResource( if (result.is_null()) return 0; - return (new Audio(result, config_id, - audio_callback, user_data))->GetReference(); + return (new Audio(result, config_id, audio_callback, user_data))-> + GetReference(); } bool PPB_Audio_Proxy::OnMessageReceived(const IPC::Message& msg) { @@ -201,8 +199,8 @@ void PPB_Audio_Proxy::OnMsgCreate(PP_Instance instance_id, int32_t sample_rate, uint32_t sample_frame_count, HostResource* result) { - ::ppapi::thunk::EnterFunction< ::ppapi::thunk::ResourceCreationAPI> - resource_creation(instance_id, true); + thunk::EnterFunction<thunk::ResourceCreationAPI> resource_creation( + instance_id, true); if (resource_creation.failed()) return; @@ -342,4 +340,4 @@ int32_t PPB_Audio_Proxy::GetAudioConnectedHandles( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_audio_proxy.h b/ppapi/proxy/ppb_audio_proxy.h index 78abbbc..7948b9c 100644 --- a/ppapi/proxy/ppb_audio_proxy.h +++ b/ppapi/proxy/ppb_audio_proxy.h @@ -23,10 +23,9 @@ struct PPB_Audio; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class PPB_Audio_Proxy : public InterfaceProxy { @@ -82,13 +81,13 @@ class PPB_Audio_Proxy : public InterfaceProxy { base::SharedMemoryHandle* foreign_shared_memory_handle, uint32_t* shared_memory_length); - CompletionCallbackFactory<PPB_Audio_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Audio_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_ diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc index b0ebcb5..68ba8c0 100644 --- a/ppapi/proxy/ppb_broker_proxy.cc +++ b/ppapi/proxy/ppb_broker_proxy.cc @@ -13,11 +13,9 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::PPB_Broker_API; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -275,4 +273,4 @@ void PPB_Broker_Proxy::ConnectCompleteInHost(int32_t result, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_broker_proxy.h b/ppapi/proxy/ppb_broker_proxy.h index f50291e..e8c34e2 100644 --- a/ppapi/proxy/ppb_broker_proxy.h +++ b/ppapi/proxy/ppb_broker_proxy.h @@ -15,10 +15,9 @@ struct PPB_BrokerTrusted; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class PPB_Broker_Proxy : public InterfaceProxy { @@ -48,11 +47,11 @@ class PPB_Broker_Proxy : public InterfaceProxy { void ConnectCompleteInHost(int32_t result, const ppapi::HostResource& host_resource); - CompletionCallbackFactory<PPB_Broker_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Broker_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_BROKER_PROXY_H_ diff --git a/ppapi/proxy/ppb_buffer_proxy.cc b/ppapi/proxy/ppb_buffer_proxy.cc index 9598a4f..d9092fe 100644 --- a/ppapi/proxy/ppb_buffer_proxy.cc +++ b/ppapi/proxy/ppb_buffer_proxy.cc @@ -19,10 +19,7 @@ #include "ppapi/thunk/ppb_buffer_trusted_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -48,7 +45,7 @@ Buffer::~Buffer() { Unmap(); } -ppapi::thunk::PPB_Buffer_API* Buffer::AsPPB_Buffer_API() { +thunk::PPB_Buffer_API* Buffer::AsPPB_Buffer_API() { return this; } @@ -83,7 +80,7 @@ PPB_Buffer_Proxy::~PPB_Buffer_Proxy() { // static const InterfaceProxy::Info* PPB_Buffer_Proxy::GetInfo() { static const Info info = { - ppapi::thunk::GetPPB_Buffer_Thunk(), + thunk::GetPPB_Buffer_Thunk(), PPB_BUFFER_DEV_INTERFACE, INTERFACE_ID_PPB_BUFFER, false, @@ -142,8 +139,8 @@ void PPB_Buffer_Proxy::OnMsgCreate( ppb_buffer_target()->Create(instance, size); if (local_buffer_resource == 0) return; - ::ppapi::thunk::EnterResourceNoLock< ::ppapi::thunk::PPB_BufferTrusted_API> - trusted_buffer(local_buffer_resource, false); + thunk::EnterResourceNoLock<thunk::PPB_BufferTrusted_API> trusted_buffer( + local_buffer_resource, false); if (trusted_buffer.failed()) return; int local_fd; @@ -166,4 +163,4 @@ void PPB_Buffer_Proxy::OnMsgCreate( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_buffer_proxy.h b/ppapi/proxy/ppb_buffer_proxy.h index 9d6cfbe..2c0b875 100644 --- a/ppapi/proxy/ppb_buffer_proxy.h +++ b/ppapi/proxy/ppb_buffer_proxy.h @@ -14,22 +14,20 @@ struct PPB_Buffer_Dev; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { -class Buffer : public ppapi::thunk::PPB_Buffer_API, - public ppapi::Resource { +class Buffer : public thunk::PPB_Buffer_API, public Resource { public: - Buffer(const ppapi::HostResource& resource, + Buffer(const HostResource& resource, const base::SharedMemoryHandle& shm_handle, uint32_t size); virtual ~Buffer(); // Resource overrides. - virtual ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; + virtual thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; // PPB_Buffer_API implementation. virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; @@ -55,7 +53,7 @@ class PPB_Buffer_Proxy : public InterfaceProxy { static PP_Resource CreateProxyResource(PP_Instance instance, uint32_t size); - static PP_Resource AddProxyResource(const ppapi::HostResource& resource, + static PP_Resource AddProxyResource(const HostResource& resource, base::SharedMemoryHandle shm_handle, uint32_t size); @@ -70,11 +68,11 @@ class PPB_Buffer_Proxy : public InterfaceProxy { // Message handlers. void OnMsgCreate(PP_Instance instance, uint32_t size, - ppapi::HostResource* result_resource, + HostResource* result_resource, base::SharedMemoryHandle* result_shm_handle); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_BUFFER_PROXY_H_ diff --git a/ppapi/proxy/ppb_char_set_proxy.cc b/ppapi/proxy/ppb_char_set_proxy.cc index 4701ded..f23626f 100644 --- a/ppapi/proxy/ppb_char_set_proxy.cc +++ b/ppapi/proxy/ppb_char_set_proxy.cc @@ -14,7 +14,7 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -109,4 +109,4 @@ void PPB_CharSet_Proxy::OnMsgGetDefaultCharSet( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_char_set_proxy.h b/ppapi/proxy/ppb_char_set_proxy.h index 0f70ab5..af5cdc0 100644 --- a/ppapi/proxy/ppb_char_set_proxy.h +++ b/ppapi/proxy/ppb_char_set_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -14,7 +14,7 @@ struct PPB_CharSet_Dev; struct PPB_Core; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReturnValue; @@ -56,6 +56,6 @@ class PPB_CharSet_Proxy : public ppapi::FunctionGroupBase, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ diff --git a/ppapi/proxy/ppb_console_proxy.cc b/ppapi/proxy/ppb_console_proxy.cc index a04aacc..3745a77 100644 --- a/ppapi/proxy/ppb_console_proxy.cc +++ b/ppapi/proxy/ppb_console_proxy.cc @@ -8,7 +8,7 @@ #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -99,5 +99,5 @@ void PPB_Console_Proxy::OnMsgLogWithSource(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_console_proxy.h b/ppapi/proxy/ppb_console_proxy.h index af1c9e0..33c1d2b 100644 --- a/ppapi/proxy/ppb_console_proxy.h +++ b/ppapi/proxy/ppb_console_proxy.h @@ -12,7 +12,7 @@ struct PPB_Console_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPB_Console_Proxy : public InterfaceProxy { @@ -43,6 +43,6 @@ class PPB_Console_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_CONSOLE_PROXY_H_ diff --git a/ppapi/proxy/ppb_context_3d_proxy.cc b/ppapi/proxy/ppb_context_3d_proxy.cc index a213635..26ad740 100644 --- a/ppapi/proxy/ppb_context_3d_proxy.cc +++ b/ppapi/proxy/ppb_context_3d_proxy.cc @@ -19,15 +19,13 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Context3D_API; using ppapi::thunk::PPB_Surface3D_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -534,7 +532,7 @@ PPB_Context3D_Proxy::~PPB_Context3D_Proxy() { // static const InterfaceProxy::Info* PPB_Context3D_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_Context3D_Thunk(), + thunk::GetPPB_Context3D_Thunk(), PPB_CONTEXT_3D_DEV_INTERFACE, INTERFACE_ID_PPB_CONTEXT_3D, false, @@ -546,7 +544,7 @@ const InterfaceProxy::Info* PPB_Context3D_Proxy::GetInfo() { // static const InterfaceProxy::Info* PPB_Context3D_Proxy::GetTextureMappingInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_GLESChromiumTextureMapping_Thunk(), + thunk::GetPPB_GLESChromiumTextureMapping_Thunk(), PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE, INTERFACE_ID_NONE, // CONTEXT_3D is the canonical one. false, @@ -730,4 +728,4 @@ void PPB_Context3D_Proxy::OnMsgGetTransferBuffer( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_context_3d_proxy.h b/ppapi/proxy/ppb_context_3d_proxy.h index cdbdd70..e7ac81f 100644 --- a/ppapi/proxy/ppb_context_3d_proxy.h +++ b/ppapi/proxy/ppb_context_3d_proxy.h @@ -30,19 +30,19 @@ class GLES2Implementation; } // namespace gpu -namespace pp { +namespace ppapi { namespace proxy { class Surface3D; -class Context3D : public ppapi::Resource, - public ppapi::thunk::PPB_Context3D_API { +class Context3D : public Resource, + public thunk::PPB_Context3D_API { public: - explicit Context3D(const ppapi::HostResource& resource); + explicit Context3D(const HostResource& resource); virtual ~Context3D(); // Resource overrides. - virtual ::ppapi::thunk::PPB_Context3D_API* AsPPB_Context3D_API() OVERRIDE; + virtual thunk::PPB_Context3D_API* AsPPB_Context3D_API() OVERRIDE; gpu::gles2::GLES2Implementation* gles2_impl() const { return gles2_impl_.get(); @@ -113,34 +113,34 @@ class PPB_Context3D_Proxy : public InterfaceProxy { void OnMsgCreate(PP_Instance instance, PP_Config3D_Dev config, const std::vector<int32_t>& attribs, - ppapi::HostResource* result); - void OnMsgBindSurfaces(const ppapi::HostResource& context, - const ppapi::HostResource& draw, - const ppapi::HostResource& read, + HostResource* result); + void OnMsgBindSurfaces(const HostResource& context, + const HostResource& draw, + const HostResource& read, int32_t* result); - void OnMsgInitialize(const ppapi::HostResource& context, + void OnMsgInitialize(const HostResource& context, int32 size, base::SharedMemoryHandle* ring_buffer); - void OnMsgGetState(const ppapi::HostResource& context, + void OnMsgGetState(const HostResource& context, gpu::CommandBuffer::State* state); - void OnMsgFlush(const ppapi::HostResource& context, + void OnMsgFlush(const HostResource& context, int32 put_offset, int32 last_known_get, gpu::CommandBuffer::State* state); - void OnMsgAsyncFlush(const ppapi::HostResource& context, + void OnMsgAsyncFlush(const HostResource& context, int32 put_offset); - void OnMsgCreateTransferBuffer(const ppapi::HostResource& context, + void OnMsgCreateTransferBuffer(const HostResource& context, int32 size, int32* id); - void OnMsgDestroyTransferBuffer(const ppapi::HostResource& context, + void OnMsgDestroyTransferBuffer(const HostResource& context, int32 id); - void OnMsgGetTransferBuffer(const ppapi::HostResource& context, + void OnMsgGetTransferBuffer(const HostResource& context, int32 id, base::SharedMemoryHandle* transfer_buffer, uint32* size); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ diff --git a/ppapi/proxy/ppb_core_proxy.cc b/ppapi/proxy/ppb_core_proxy.cc index 33820bc..83eea37 100644 --- a/ppapi/proxy/ppb_core_proxy.cc +++ b/ppapi/proxy/ppb_core_proxy.cc @@ -19,11 +19,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/time_conversion.h" -using ppapi::HostResource; -using ppapi::TimeToPPTime; -using ppapi::TimeTicksToPPTimeTicks; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -128,4 +124,4 @@ void PPB_Core_Proxy::OnMsgReleaseResource(const HostResource& resource) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_core_proxy.h b/ppapi/proxy/ppb_core_proxy.h index 14c88e5..1963e71 100644 --- a/ppapi/proxy/ppb_core_proxy.h +++ b/ppapi/proxy/ppb_core_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -13,7 +13,7 @@ struct PPB_Core; -namespace pp { +namespace ppapi { namespace proxy { class PPB_Core_Proxy : public InterfaceProxy { @@ -37,6 +37,6 @@ class PPB_Core_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_CORE_PROXY_H_ diff --git a/ppapi/proxy/ppb_crypto_proxy.cc b/ppapi/proxy/ppb_crypto_proxy.cc index d900800..c534864 100644 --- a/ppapi/proxy/ppb_crypto_proxy.cc +++ b/ppapi/proxy/ppb_crypto_proxy.cc @@ -8,7 +8,7 @@ #include "ppapi/proxy/interface_id.h" #include "ppapi/shared_impl/crypto_impl.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -51,4 +51,4 @@ bool PPB_Crypto_Proxy::OnMessageReceived(const IPC::Message& msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_crypto_proxy.h b/ppapi/proxy/ppb_crypto_proxy.h index e801892..3ad77c9 100644 --- a/ppapi/proxy/ppb_crypto_proxy.h +++ b/ppapi/proxy/ppb_crypto_proxy.h @@ -7,7 +7,7 @@ #include "ppapi/proxy/interface_proxy.h" -namespace pp { +namespace ppapi { namespace proxy { class PPB_Crypto_Proxy : public InterfaceProxy { @@ -28,6 +28,6 @@ class PPB_Crypto_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_CRYPTO_PROXY_H_ diff --git a/ppapi/proxy/ppb_cursor_control_proxy.cc b/ppapi/proxy/ppb_cursor_control_proxy.cc index cef77f2..5366ea0 100644 --- a/ppapi/proxy/ppb_cursor_control_proxy.cc +++ b/ppapi/proxy/ppb_cursor_control_proxy.cc @@ -12,12 +12,10 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::PPB_CursorControl_FunctionAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -40,7 +38,7 @@ PPB_CursorControl_Proxy::~PPB_CursorControl_Proxy() { // static const InterfaceProxy::Info* PPB_CursorControl_Proxy::GetInfo() { static const Info info = { - ppapi::thunk::GetPPB_CursorControl_Thunk(), + thunk::GetPPB_CursorControl_Thunk(), PPB_CURSOR_CONTROL_DEV_INTERFACE, INTERFACE_ID_PPB_CURSORCONTROL, false, @@ -169,4 +167,4 @@ void PPB_CursorControl_Proxy::OnMsgCanLockCursor(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_cursor_control_proxy.h b/ppapi/proxy/ppb_cursor_control_proxy.h index 40bc600..027dbfe 100644 --- a/ppapi/proxy/ppb_cursor_control_proxy.h +++ b/ppapi/proxy/ppb_cursor_control_proxy.h @@ -17,7 +17,7 @@ struct PPB_CursorControl_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPB_CursorControl_Proxy @@ -65,6 +65,6 @@ class PPB_CursorControl_Proxy }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ diff --git a/ppapi/proxy/ppb_file_chooser_proxy.cc b/ppapi/proxy/ppb_file_chooser_proxy.cc index ae0eac7..385c7f8 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.cc +++ b/ppapi/proxy/ppb_file_chooser_proxy.cc @@ -17,11 +17,9 @@ #include "ppapi/proxy/serialized_var.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::PPB_FileChooser_API; -namespace pp { +namespace ppapi { namespace proxy { class FileChooser : public Resource, @@ -139,7 +137,7 @@ PPB_FileChooser_Proxy::~PPB_FileChooser_Proxy() { const InterfaceProxy::Info* PPB_FileChooser_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_FileChooser_Thunk(), + thunk::GetPPB_FileChooser_Thunk(), PPB_FILECHOOSER_DEV_INTERFACE, INTERFACE_ID_PPB_FILE_CHOOSER, false, @@ -239,4 +237,4 @@ void PPB_FileChooser_Proxy::OnShowCallback(int32_t result, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_file_chooser_proxy.h b/ppapi/proxy/ppb_file_chooser_proxy.h index 513399e..40a453f 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.h +++ b/ppapi/proxy/ppb_file_chooser_proxy.h @@ -18,10 +18,9 @@ struct PPB_FileChooser_Dev; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { struct PPBFileRef_CreateInfo; @@ -62,13 +61,13 @@ class PPB_FileChooser_Proxy : public InterfaceProxy { // via IPC and OnMsgChooseComplete will be called there. void OnShowCallback(int32_t result, const ppapi::HostResource& chooser); - CompletionCallbackFactory<PPB_FileChooser_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_FileChooser_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; DISALLOW_COPY_AND_ASSIGN(PPB_FileChooser_Proxy); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ diff --git a/ppapi/proxy/ppb_file_ref_proxy.cc b/ppapi/proxy/ppb_file_ref_proxy.cc index d831bfc..9ad0635 100644 --- a/ppapi/proxy/ppb_file_ref_proxy.cc +++ b/ppapi/proxy/ppb_file_ref_proxy.cc @@ -16,14 +16,12 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_FileRef_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -161,7 +159,7 @@ PPB_FileRef_Proxy::~PPB_FileRef_Proxy() { const InterfaceProxy::Info* PPB_FileRef_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_FileRef_Thunk(), + thunk::GetPPB_FileRef_Thunk(), PPB_FILEREF_INTERFACE, INTERFACE_ID_PPB_FILE_REF, false, @@ -306,4 +304,4 @@ void PPB_FileRef_Proxy::OnMsgRename(const HostResource& file_ref, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_file_ref_proxy.h b/ppapi/proxy/ppb_file_ref_proxy.h index d03a9dd..3ae502d 100644 --- a/ppapi/proxy/ppb_file_ref_proxy.h +++ b/ppapi/proxy/ppb_file_ref_proxy.h @@ -16,10 +16,9 @@ struct PPB_FileRef_Dev; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { struct PPBFileRef_CreateInfo; @@ -83,6 +82,6 @@ class PPB_FileRef_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ diff --git a/ppapi/proxy/ppb_file_system_proxy.cc b/ppapi/proxy/ppb_file_system_proxy.cc index b3035b9..899c51f 100644 --- a/ppapi/proxy/ppb_file_system_proxy.cc +++ b/ppapi/proxy/ppb_file_system_proxy.cc @@ -18,13 +18,11 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::PPB_FileSystem_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -123,7 +121,7 @@ PPB_FileSystem_Proxy::~PPB_FileSystem_Proxy() { const InterfaceProxy::Info* PPB_FileSystem_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_FileSystem_Thunk(), + thunk::GetPPB_FileSystem_Thunk(), PPB_FILESYSTEM_INTERFACE, INTERFACE_ID_PPB_FILE_SYSTEM, false, @@ -197,4 +195,4 @@ void PPB_FileSystem_Proxy::OpenCompleteInHost( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_file_system_proxy.h b/ppapi/proxy/ppb_file_system_proxy.h index 795abcb..b83fb992 100644 --- a/ppapi/proxy/ppb_file_system_proxy.h +++ b/ppapi/proxy/ppb_file_system_proxy.h @@ -19,10 +19,9 @@ struct PPB_FileSystem_Dev; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class PPB_FileSystem_Proxy : public InterfaceProxy { @@ -52,13 +51,13 @@ class PPB_FileSystem_Proxy : public InterfaceProxy { void OpenCompleteInHost(int32_t result, const ppapi::HostResource& host_resource); - CompletionCallbackFactory<PPB_FileSystem_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_FileSystem_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Proxy); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_ diff --git a/ppapi/proxy/ppb_flash_clipboard_proxy.cc b/ppapi/proxy/ppb_flash_clipboard_proxy.cc index 8dc98ff..38e3e5b 100644 --- a/ppapi/proxy/ppb_flash_clipboard_proxy.cc +++ b/ppapi/proxy/ppb_flash_clipboard_proxy.cc @@ -10,7 +10,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -162,4 +162,4 @@ void PPB_Flash_Clipboard_Proxy::OnMsgWritePlainText( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_clipboard_proxy.h b/ppapi/proxy/ppb_flash_clipboard_proxy.h index 6d9604f..e0a1acf 100644 --- a/ppapi/proxy/ppb_flash_clipboard_proxy.h +++ b/ppapi/proxy/ppb_flash_clipboard_proxy.h @@ -10,7 +10,7 @@ struct PPB_Flash_Clipboard; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReceiveInput; @@ -46,6 +46,6 @@ class PPB_Flash_Clipboard_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ diff --git a/ppapi/proxy/ppb_flash_file_proxy.cc b/ppapi/proxy/ppb_flash_file_proxy.cc index 9400728..138f990 100644 --- a/ppapi/proxy/ppb_flash_file_proxy.cc +++ b/ppapi/proxy/ppb_flash_file_proxy.cc @@ -24,10 +24,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/resource.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -603,7 +600,7 @@ void PPB_Flash_File_ModuleLocal_Proxy::OnMsgQueryFile(PP_Instance instance, void PPB_Flash_File_ModuleLocal_Proxy::OnMsgGetDirContents( PP_Instance instance, const std::string& path, - std::vector<pp::proxy::SerializedDirEntry>* entries, + std::vector<SerializedDirEntry>* entries, int32_t* result) { PP_DirContents_Dev* contents = NULL; *result = ppb_flash_file_module_local_target()-> @@ -731,4 +728,4 @@ void PPB_Flash_File_FileRef_Proxy::OnMsgQueryFile( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_file_proxy.h b/ppapi/proxy/ppb_flash_file_proxy.h index 3a007fe..ee8d05d 100644 --- a/ppapi/proxy/ppb_flash_file_proxy.h +++ b/ppapi/proxy/ppb_flash_file_proxy.h @@ -18,10 +18,9 @@ struct PPB_Flash_File_FileRef; struct PPB_Flash_File_ModuleLocal; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { struct SerializedDirEntry; @@ -65,7 +64,7 @@ class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy { int32_t* result); void OnMsgGetDirContents(PP_Instance instance, const std::string& path, - std::vector<pp::proxy::SerializedDirEntry>* entries, + std::vector<SerializedDirEntry>* entries, int32_t* result); }; @@ -96,6 +95,6 @@ class PPB_Flash_File_FileRef_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_ diff --git a/ppapi/proxy/ppb_flash_menu_proxy.cc b/ppapi/proxy/ppb_flash_menu_proxy.cc index 98ee3b6..5f6ff05 100644 --- a/ppapi/proxy/ppb_flash_menu_proxy.cc +++ b/ppapi/proxy/ppb_flash_menu_proxy.cc @@ -13,13 +13,11 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::PPB_Flash_Menu_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { class FlashMenu : public PPB_Flash_Menu_API, public Resource { @@ -116,7 +114,7 @@ PP_Resource PPB_Flash_Menu_Proxy::CreateProxyResource( return 0; HostResource result; - pp::proxy::SerializedFlashMenu serialized_menu; + SerializedFlashMenu serialized_menu; if (!serialized_menu.SetPPMenu(menu_data)) return 0; @@ -194,4 +192,4 @@ void PPB_Flash_Menu_Proxy::SendShowACKToPlugin( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_menu_proxy.h b/ppapi/proxy/ppb_flash_menu_proxy.h index adce7ec..869a7d6 100644 --- a/ppapi/proxy/ppb_flash_menu_proxy.h +++ b/ppapi/proxy/ppb_flash_menu_proxy.h @@ -13,10 +13,9 @@ struct PP_Point; struct PPB_Flash_Menu; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class SerializedFlashMenu; @@ -47,11 +46,11 @@ class PPB_Flash_Menu_Proxy : public InterfaceProxy { int32_t result); void SendShowACKToPlugin(int32_t result, ShowRequest* request); - CompletionCallbackFactory<PPB_Flash_Menu_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Flash_Menu_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_FLASH_MENU_PROXY_H_ diff --git a/ppapi/proxy/ppb_flash_net_connector_proxy.cc b/ppapi/proxy/ppb_flash_net_connector_proxy.cc index c222720..acad6a89 100644 --- a/ppapi/proxy/ppb_flash_net_connector_proxy.cc +++ b/ppapi/proxy/ppb_flash_net_connector_proxy.cc @@ -17,13 +17,11 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::PPB_Flash_NetConnector_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { std::string NetAddressToString(const PP_Flash_NetAddress& addr) { @@ -264,7 +262,7 @@ void PPB_Flash_NetConnector_Proxy::OnMsgConnectTcp( const std::string& host, uint16_t port) { ConnectCallbackInfo* info = new ConnectCallbackInfo(resource); - CompletionCallback callback = callback_factory_.NewOptionalCallback( + pp::CompletionCallback callback = callback_factory_.NewOptionalCallback( &PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost, info); EnterHostFromHostResource<PPB_Flash_NetConnector_API> enter(resource); @@ -282,7 +280,7 @@ void PPB_Flash_NetConnector_Proxy::OnMsgConnectTcpAddress( const HostResource& resource, const std::string& net_address_as_string) { ConnectCallbackInfo* info = new ConnectCallbackInfo(resource); - CompletionCallback callback = callback_factory_.NewOptionalCallback( + pp::CompletionCallback callback = callback_factory_.NewOptionalCallback( &PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost, info); PP_Flash_NetAddress net_address; @@ -341,4 +339,4 @@ void PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_net_connector_proxy.h b/ppapi/proxy/ppb_flash_net_connector_proxy.h index d43bd62..191b350 100644 --- a/ppapi/proxy/ppb_flash_net_connector_proxy.h +++ b/ppapi/proxy/ppb_flash_net_connector_proxy.h @@ -15,10 +15,9 @@ struct PPB_Flash_NetConnector; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class PPB_Flash_NetConnector_Proxy : public InterfaceProxy { @@ -55,11 +54,11 @@ class PPB_Flash_NetConnector_Proxy : public InterfaceProxy { void OnCompleteCallbackInHost(int32_t result, ConnectCallbackInfo* info); - CompletionCallbackFactory<PPB_Flash_NetConnector_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Flash_NetConnector_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FLASH_NET_CONNECTOR_PROXY_H_ diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc index bbe7018..725af5f 100644 --- a/ppapi/proxy/ppb_flash_proxy.cc +++ b/ppapi/proxy/ppb_flash_proxy.cc @@ -20,10 +20,7 @@ #include "ppapi/proxy/serialized_var.h" #include "ppapi/shared_impl/resource.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -156,8 +153,7 @@ PP_Var GetCommandLineArgs(PP_Module pp_module) { static_cast<const PPB_Var_Deprecated*>( PluginDispatcher::GetInterfaceFromDispatcher( PPB_VAR_DEPRECATED_INTERFACE)); - std::string args = - pp::proxy::ProxyModule::GetInstance()->GetFlashCommandLineArgs(); + std::string args = ProxyModule::GetInstance()->GetFlashCommandLineArgs(); return var_deprecated->VarFromUtf8(pp_module, args.data(), args.length()); } @@ -232,9 +228,8 @@ void PPB_Flash_Proxy::OnMsgSetInstanceAlwaysOnTop( ppb_flash_target()->SetInstanceAlwaysOnTop(instance, on_top); } -void PPB_Flash_Proxy::OnMsgDrawGlyphs( - const pp::proxy::PPBFlash_DrawGlyphs_Params& params, - PP_Bool* result) { +void PPB_Flash_Proxy::OnMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params, + PP_Bool* result) { *result = PP_FALSE; PP_FontDescription_Dev font_desc; @@ -292,4 +287,4 @@ void PPB_Flash_Proxy::OnMsgGetLocalTimeZoneOffset(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_proxy.h b/ppapi/proxy/ppb_flash_proxy.h index 27ec0c2a..faf4222 100644 --- a/ppapi/proxy/ppb_flash_proxy.h +++ b/ppapi/proxy/ppb_flash_proxy.h @@ -18,7 +18,7 @@ struct PP_FileInfo; struct PPB_Flash; -namespace pp { +namespace ppapi { namespace proxy { struct PPBFlash_DrawGlyphs_Params; @@ -42,12 +42,12 @@ class PPB_Flash_Proxy : public InterfaceProxy { // Message handlers. void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, PP_Bool on_top); - void OnMsgDrawGlyphs(const pp::proxy::PPBFlash_DrawGlyphs_Params& params, + void OnMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params, PP_Bool* result); void OnMsgGetProxyForURL(PP_Instance instance, const std::string& url, SerializedVarReturnValue result); - void OnMsgNavigate(const ppapi::HostResource& request_info, + void OnMsgNavigate(const HostResource& request_info, const std::string& target, bool from_user_action, int32_t* result); @@ -58,6 +58,6 @@ class PPB_Flash_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_FLASH_PROXY_H_ diff --git a/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc b/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc index 52dca5d..12d40b7 100644 --- a/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc +++ b/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc @@ -20,11 +20,9 @@ #include "ppapi/thunk/ppb_flash_tcp_socket_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::PPB_Flash_TCPSocket_API; -namespace pp { +namespace ppapi { namespace proxy { const int32_t kFlashTCPSocketMaxReadSize = 1024 * 1024; @@ -403,7 +401,7 @@ PPB_Flash_TCPSocket_Proxy::~PPB_Flash_TCPSocket_Proxy() { // static const InterfaceProxy::Info* PPB_Flash_TCPSocket_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_Flash_TCPSocket_Thunk(), + thunk::GetPPB_Flash_TCPSocket_Thunk(), PPB_FLASH_TCPSOCKET_INTERFACE, INTERFACE_ID_PPB_FLASH_TCPSOCKET, false, @@ -501,4 +499,4 @@ void PPB_Flash_TCPSocket_Proxy::OnMsgWriteACK(uint32 /* plugin_dispatcher_id */, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_tcp_socket_proxy.h b/ppapi/proxy/ppb_flash_tcp_socket_proxy.h index 2f83ae7..a0a402b 100644 --- a/ppapi/proxy/ppb_flash_tcp_socket_proxy.h +++ b/ppapi/proxy/ppb_flash_tcp_socket_proxy.h @@ -13,7 +13,7 @@ #include "ppapi/c/private/ppb_flash_tcp_socket.h" #include "ppapi/proxy/interface_proxy.h" -namespace pp { +namespace ppapi { namespace proxy { // The maximum number of bytes that each PpapiHostMsg_PPBFlashTCPSocket_Read @@ -59,6 +59,6 @@ class PPB_Flash_TCPSocket_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FLASH_TCP_SOCKET_PROXY_H_ diff --git a/ppapi/proxy/ppb_font_proxy.cc b/ppapi/proxy/ppb_font_proxy.cc index 2760c0b..987c918 100644 --- a/ppapi/proxy/ppb_font_proxy.cc +++ b/ppapi/proxy/ppb_font_proxy.cc @@ -18,14 +18,12 @@ #include "ppapi/thunk/ppb_image_data_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; -using ppapi::StringVar; using ppapi::thunk::EnterResourceNoLock; +using ppapi::thunk::PPB_Font_API; +using ppapi::thunk::PPB_Font_FunctionAPI; using ppapi::thunk::PPB_ImageData_API; -using ppapi::WebKitForwarding; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -60,7 +58,7 @@ PPB_Font_Proxy::~PPB_Font_Proxy() { // static const InterfaceProxy::Info* PPB_Font_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_Font_Thunk(), + thunk::GetPPB_Font_Thunk(), PPB_FONT_DEV_INTERFACE, INTERFACE_ID_PPB_FONT, false, @@ -69,7 +67,7 @@ const InterfaceProxy::Info* PPB_Font_Proxy::GetInfo() { return &info; } -::ppapi::thunk::PPB_Font_FunctionAPI* PPB_Font_Proxy::AsPPB_Font_FunctionAPI() { +PPB_Font_FunctionAPI* PPB_Font_Proxy::AsPPB_Font_FunctionAPI() { return this; } @@ -117,7 +115,7 @@ Font::~Font() { RunOnWebKitThread(false, base::Bind(&DeleteFontForwarding, font_forwarding_)); } -ppapi::thunk::PPB_Font_API* Font::AsPPB_Font_API() { +PPB_Font_API* Font::AsPPB_Font_API() { return this; } @@ -229,10 +227,9 @@ void Font::RunOnWebKitThread(bool blocking, const base::Closure& task) { } // static -void Font::DeleteFontForwarding( - ppapi::WebKitForwarding::Font* font_forwarding) { +void Font::DeleteFontForwarding(WebKitForwarding::Font* font_forwarding) { delete font_forwarding; } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_font_proxy.h b/ppapi/proxy/ppb_font_proxy.h index 8ea0e51..c9807e2 100644 --- a/ppapi/proxy/ppb_font_proxy.h +++ b/ppapi/proxy/ppb_font_proxy.h @@ -16,7 +16,7 @@ struct PPB_Font_Dev; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReturnValue; @@ -92,6 +92,6 @@ class Font : public ppapi::Resource, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_ diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.cc b/ppapi/proxy/ppb_graphics_2d_proxy.cc index f752949..a855cfd 100644 --- a/ppapi/proxy/ppb_graphics_2d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_2d_proxy.cc @@ -19,11 +19,9 @@ #include "ppapi/thunk/ppb_graphics_2d_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::PPB_Graphics2D_API; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -35,8 +33,7 @@ InterfaceProxy* CreateGraphics2DProxy(Dispatcher* dispatcher, } // namespace -class Graphics2D : public ppapi::Resource, - public ppapi::thunk::PPB_Graphics2D_API { +class Graphics2D : public Resource, public thunk::PPB_Graphics2D_API { public: Graphics2D(const HostResource& host_resource, const PP_Size& size, @@ -163,7 +160,7 @@ PPB_Graphics2D_Proxy::~PPB_Graphics2D_Proxy() { // static const InterfaceProxy::Info* PPB_Graphics2D_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_Graphics2D_Thunk(), + thunk::GetPPB_Graphics2D_Thunk(), PPB_GRAPHICS_2D_INTERFACE, INTERFACE_ID_PPB_GRAPHICS_2D, false, @@ -266,4 +263,4 @@ void PPB_Graphics2D_Proxy::SendFlushACKToPlugin( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.h b/ppapi/proxy/ppb_graphics_2d_proxy.h index 7834acc..cd4c55f 100644 --- a/ppapi/proxy/ppb_graphics_2d_proxy.h +++ b/ppapi/proxy/ppb_graphics_2d_proxy.h @@ -21,7 +21,7 @@ struct PPB_Graphics2D; struct PP_Point; struct PP_Rect; -namespace pp { +namespace ppapi { namespace proxy { class PPB_Graphics2D_Proxy : public InterfaceProxy { @@ -65,11 +65,11 @@ class PPB_Graphics2D_Proxy : public InterfaceProxy { void SendFlushACKToPlugin(int32_t result, const ppapi::HostResource& graphics_2d); - CompletionCallbackFactory<PPB_Graphics2D_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Graphics2D_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_GRAPHICS_2D_PROXY_H_ diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index a8cea51..834f49e 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -13,14 +13,12 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Graphics3D_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -409,7 +407,7 @@ PPB_Graphics3D_Proxy::~PPB_Graphics3D_Proxy() { // static const InterfaceProxy::Info* PPB_Graphics3D_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_Graphics3D_Thunk(), + thunk::GetPPB_Graphics3D_Thunk(), PPB_GRAPHICS_3D_DEV_INTERFACE, INTERFACE_ID_PPB_GRAPHICS_3D, false, @@ -607,5 +605,5 @@ void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h index bb6df67..db67a2f 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/ppapi/proxy/ppb_graphics_3d_proxy.h @@ -18,22 +18,20 @@ #include "ppapi/shared_impl/resource.h" namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { -class Graphics3D : public ppapi::Resource, - public ppapi::Graphics3DImpl { +class Graphics3D : public Resource, public Graphics3DImpl { public: - explicit Graphics3D(const ppapi::HostResource& resource); + explicit Graphics3D(const HostResource& resource); virtual ~Graphics3D(); bool Init(); // Resource overrides. - virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE { + virtual thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE { return this; } @@ -53,7 +51,7 @@ class Graphics3D : public ppapi::Resource, int32_t last_known_get) OVERRIDE; protected: - // ppapi::Graphics3DImpl overrides. + // Graphics3DImpl overrides. virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; virtual int32 DoSwapBuffers() OVERRIDE; @@ -84,43 +82,43 @@ class PPB_Graphics3D_Proxy : public InterfaceProxy { private: void OnMsgCreate(PP_Instance instance, const std::vector<int32_t>& attribs, - ppapi::HostResource* result); - void OnMsgInitCommandBuffer(const ppapi::HostResource& context, + HostResource* result); + void OnMsgInitCommandBuffer(const HostResource& context, int32 size, base::SharedMemoryHandle* ring_buffer); - void OnMsgGetState(const ppapi::HostResource& context, + void OnMsgGetState(const HostResource& context, gpu::CommandBuffer::State* state); - void OnMsgFlush(const ppapi::HostResource& context, + void OnMsgFlush(const HostResource& context, int32 put_offset, int32 last_known_get, gpu::CommandBuffer::State* state); - void OnMsgAsyncFlush(const ppapi::HostResource& context, + void OnMsgAsyncFlush(const HostResource& context, int32 put_offset); - void OnMsgCreateTransferBuffer(const ppapi::HostResource& context, + void OnMsgCreateTransferBuffer(const HostResource& context, int32 size, int32* id); - void OnMsgDestroyTransferBuffer(const ppapi::HostResource& context, + void OnMsgDestroyTransferBuffer(const HostResource& context, int32 id); - void OnMsgGetTransferBuffer(const ppapi::HostResource& context, + void OnMsgGetTransferBuffer(const HostResource& context, int32 id, base::SharedMemoryHandle* transfer_buffer, uint32* size); - void OnMsgSwapBuffers(const ppapi::HostResource& context); + void OnMsgSwapBuffers(const HostResource& context); // Renderer->plugin message handlers. - void OnMsgSwapBuffersACK(const ppapi::HostResource& context, + void OnMsgSwapBuffersACK(const HostResource& context, int32_t pp_error); void SendSwapBuffersACKToPlugin(int32_t result, - const ppapi::HostResource& context); + const HostResource& context); - CompletionCallbackFactory<PPB_Graphics3D_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Graphics3D_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc index 9e090c8..0f96b99 100644 --- a/ppapi/proxy/ppb_image_data_proxy.cc +++ b/ppapi/proxy/ppb_image_data_proxy.cc @@ -22,10 +22,7 @@ #include "skia/ext/platform_canvas.h" #include "ui/gfx/surface/transport_dib.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -50,7 +47,7 @@ PPB_ImageData_Proxy::~PPB_ImageData_Proxy() { // static const InterfaceProxy::Info* PPB_ImageData_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_ImageData_Thunk(), + thunk::GetPPB_ImageData_Thunk(), PPB_IMAGEDATA_INTERFACE, INTERFACE_ID_PPB_IMAGE_DATA, false, @@ -80,7 +77,7 @@ ImageData::ImageData(const HostResource& resource, ImageData::~ImageData() { } -::ppapi::thunk::PPB_ImageData_API* ImageData::AsPPB_ImageData_API() { +thunk::PPB_ImageData_API* ImageData::AsPPB_ImageData_API() { return this; } @@ -135,4 +132,4 @@ ImageHandle ImageData::HandleFromInt(int32_t i) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_image_data_proxy.h b/ppapi/proxy/ppb_image_data_proxy.h index c861963..1b96917 100644 --- a/ppapi/proxy/ppb_image_data_proxy.h +++ b/ppapi/proxy/ppb_image_data_proxy.h @@ -22,15 +22,14 @@ struct PPB_ImageData; class TransportDIB; -namespace ppapi { -class HostResource; -} - namespace skia { class PlatformCanvas; } -namespace pp { +namespace ppapi { + +class HostResource; + namespace proxy { class PPB_ImageData_Proxy : public InterfaceProxy { @@ -85,6 +84,6 @@ class ImageData : public ppapi::Resource, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ diff --git a/ppapi/proxy/ppb_input_event_proxy.cc b/ppapi/proxy/ppb_input_event_proxy.cc index a9b1a4f..f94cdc2 100644 --- a/ppapi/proxy/ppb_input_event_proxy.cc +++ b/ppapi/proxy/ppb_input_event_proxy.cc @@ -13,13 +13,9 @@ #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::InputEventData; -using ppapi::InputEventImpl; -using ppapi::Resource; using ppapi::thunk::PPB_InputEvent_API; -namespace pp { +namespace ppapi { namespace proxy { // The implementation is actually in InputEventImpl. @@ -51,7 +47,7 @@ PPB_InputEvent_API* InputEvent::AsPPB_InputEvent_API() { } PP_Var InputEvent::StringToPPVar(const std::string& str) { - return ppapi::StringVar::StringToPPVar(0, str); + return StringVar::StringToPPVar(0, str); } namespace { @@ -74,7 +70,7 @@ PPB_InputEvent_Proxy::~PPB_InputEvent_Proxy() { // static const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetInputEventInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_InputEvent_Thunk(), + thunk::GetPPB_InputEvent_Thunk(), PPB_INPUT_EVENT_INTERFACE, INTERFACE_ID_NONE, false, @@ -86,7 +82,7 @@ const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetInputEventInfo() { // static const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetKeyboardInputEventInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_KeyboardInputEvent_Thunk(), + thunk::GetPPB_KeyboardInputEvent_Thunk(), PPB_KEYBOARD_INPUT_EVENT_INTERFACE, INTERFACE_ID_NONE, false, @@ -98,7 +94,7 @@ const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetKeyboardInputEventInfo() { // static const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetMouseInputEventInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_MouseInputEvent_Thunk(), + thunk::GetPPB_MouseInputEvent_Thunk(), PPB_MOUSE_INPUT_EVENT_INTERFACE, INTERFACE_ID_NONE, false, @@ -110,7 +106,7 @@ const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetMouseInputEventInfo() { // static const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetWheelInputEventInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_WheelInputEvent_Thunk(), + thunk::GetPPB_WheelInputEvent_Thunk(), PPB_WHEEL_INPUT_EVENT_INTERFACE, INTERFACE_ID_NONE, false, @@ -134,4 +130,4 @@ bool PPB_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_input_event_proxy.h b/ppapi/proxy/ppb_input_event_proxy.h index fb0fedd..0cefb8d 100644 --- a/ppapi/proxy/ppb_input_event_proxy.h +++ b/ppapi/proxy/ppb_input_event_proxy.h @@ -11,10 +11,9 @@ #include "ppapi/shared_impl/input_event_impl.h" namespace ppapi { + struct InputEventData; -} -namespace pp { namespace proxy { class PPB_InputEvent_Proxy : public InterfaceProxy { @@ -38,6 +37,6 @@ class PPB_InputEvent_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_INPUT_EVENT_PROXY_H_ diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc index ffa4f66..3c02807 100644 --- a/ppapi/proxy/ppb_instance_proxy.cc +++ b/ppapi/proxy/ppb_instance_proxy.cc @@ -21,13 +21,11 @@ #undef PostMessage #endif -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Instance_FunctionAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -369,4 +367,4 @@ void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h index c2e8c6e..a7dd6e6 100644 --- a/ppapi/proxy/ppb_instance_proxy.h +++ b/ppapi/proxy/ppb_instance_proxy.h @@ -14,7 +14,7 @@ #include "ppapi/shared_impl/instance_impl.h" #include "ppapi/thunk/ppb_instance_api.h" -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReceiveInput; @@ -97,6 +97,6 @@ class PPB_Instance_Proxy : public InterfaceProxy, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ diff --git a/ppapi/proxy/ppb_memory_proxy.cc b/ppapi/proxy/ppb_memory_proxy.cc index 616e789..ec3fc03 100644 --- a/ppapi/proxy/ppb_memory_proxy.cc +++ b/ppapi/proxy/ppb_memory_proxy.cc @@ -7,7 +7,7 @@ #include "ppapi/c/dev/ppb_memory_dev.h" #include "ppapi/proxy/plugin_var_tracker.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -61,4 +61,4 @@ bool PPB_Memory_Proxy::OnMessageReceived(const IPC::Message& msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_memory_proxy.h b/ppapi/proxy/ppb_memory_proxy.h index 503dd70..6666ede 100644 --- a/ppapi/proxy/ppb_memory_proxy.h +++ b/ppapi/proxy/ppb_memory_proxy.h @@ -9,7 +9,7 @@ struct PPB_Memory_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPB_Memory_Proxy : public InterfaceProxy { @@ -31,6 +31,6 @@ class PPB_Memory_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_MEMORY_PROXY_H_ diff --git a/ppapi/proxy/ppb_opengles2_proxy.cc b/ppapi/proxy/ppb_opengles2_proxy.cc index 904054b..af22cf0 100644 --- a/ppapi/proxy/ppb_opengles2_proxy.cc +++ b/ppapi/proxy/ppb_opengles2_proxy.cc @@ -6,7 +6,7 @@ #include "ppapi/shared_impl/opengles2_impl.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -41,4 +41,4 @@ bool PPB_OpenGLES2_Proxy::OnMessageReceived(const IPC::Message& msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_opengles2_proxy.h b/ppapi/proxy/ppb_opengles2_proxy.h index 9388f4c..c424ae8 100644 --- a/ppapi/proxy/ppb_opengles2_proxy.h +++ b/ppapi/proxy/ppb_opengles2_proxy.h @@ -9,7 +9,7 @@ struct PPB_OpenGLES2_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPB_OpenGLES2_Proxy : public InterfaceProxy { @@ -28,6 +28,6 @@ class PPB_OpenGLES2_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_OPENGLES2_PROXY_H_ diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc index b7b3704..dcf3358 100644 --- a/ppapi/proxy/ppb_pdf_proxy.cc +++ b/ppapi/proxy/ppb_pdf_proxy.cc @@ -18,12 +18,10 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_pdf_api.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::PPB_PDFFont_API; using ppapi::thunk::EnterResource; -namespace pp { +namespace ppapi { namespace proxy { class PrivateFontFile : public Resource, @@ -189,4 +187,4 @@ void PPB_PDF_Proxy::OnMsgGetFontTableForPrivateFontFile( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_pdf_proxy.h b/ppapi/proxy/ppb_pdf_proxy.h index f0aba40..27ab6c4 100644 --- a/ppapi/proxy/ppb_pdf_proxy.h +++ b/ppapi/proxy/ppb_pdf_proxy.h @@ -11,7 +11,7 @@ struct PPB_PDF; -namespace pp { +namespace ppapi { namespace proxy { struct SerializedFontDescription; @@ -42,6 +42,6 @@ class PPB_PDF_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_PDF_PROXY_H_ diff --git a/ppapi/proxy/ppb_surface_3d_proxy.cc b/ppapi/proxy/ppb_surface_3d_proxy.cc index 1ddcc42..23348fc 100644 --- a/ppapi/proxy/ppb_surface_3d_proxy.cc +++ b/ppapi/proxy/ppb_surface_3d_proxy.cc @@ -16,13 +16,11 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::PPB_Surface3D_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -102,7 +100,7 @@ PPB_Surface3D_Proxy::~PPB_Surface3D_Proxy() { // static const InterfaceProxy::Info* PPB_Surface3D_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_Surface3D_Thunk(), + thunk::GetPPB_Surface3D_Thunk(), PPB_SURFACE_3D_DEV_INTERFACE, INTERFACE_ID_PPB_SURFACE_3D, false, @@ -195,4 +193,4 @@ void PPB_Surface3D_Proxy::SendSwapBuffersACKToPlugin( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_surface_3d_proxy.h b/ppapi/proxy/ppb_surface_3d_proxy.h index ae2ec8f..214bda1 100644 --- a/ppapi/proxy/ppb_surface_3d_proxy.h +++ b/ppapi/proxy/ppb_surface_3d_proxy.h @@ -18,7 +18,7 @@ struct PPB_Surface3D_Dev; -namespace pp { +namespace ppapi { namespace proxy { class Context3D; @@ -89,11 +89,11 @@ class PPB_Surface3D_Proxy : public InterfaceProxy { void SendSwapBuffersACKToPlugin(int32_t result, const ppapi::HostResource& surface_3d); - CompletionCallbackFactory<PPB_Surface3D_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_Surface3D_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_SURFACE_3D_PROXY_H_ diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc index 0e6ed6d..942521c 100644 --- a/ppapi/proxy/ppb_testing_proxy.cc +++ b/ppapi/proxy/ppb_testing_proxy.cc @@ -11,10 +11,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/resource.h" -using ppapi::HostResource; -using ppapi::Resource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -135,4 +132,4 @@ void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_testing_proxy.h b/ppapi/proxy/ppb_testing_proxy.h index d105769..c07f6a9 100644 --- a/ppapi/proxy/ppb_testing_proxy.h +++ b/ppapi/proxy/ppb_testing_proxy.h @@ -14,7 +14,7 @@ struct PP_Point; struct PPB_Testing_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPB_Testing_Proxy : public InterfaceProxy { @@ -45,6 +45,6 @@ class PPB_Testing_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ diff --git a/ppapi/proxy/ppb_url_loader_proxy.cc b/ppapi/proxy/ppb_url_loader_proxy.cc index 5528a52..3f6cd10 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.cc +++ b/ppapi/proxy/ppb_url_loader_proxy.cc @@ -31,14 +31,12 @@ #include <sys/shm.h> #endif -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_URLLoader_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -368,7 +366,7 @@ PP_Resource PPB_URLLoader_Proxy::TrackPluginResource( // static const InterfaceProxy::Info* PPB_URLLoader_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_URLLoader_Thunk(), + thunk::GetPPB_URLLoader_Thunk(), PPB_URLLOADER_INTERFACE, INTERFACE_ID_PPB_URL_LOADER, false, @@ -380,7 +378,7 @@ const InterfaceProxy::Info* PPB_URLLoader_Proxy::GetInfo() { // static const InterfaceProxy::Info* PPB_URLLoader_Proxy::GetTrustedInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(), + thunk::GetPPB_URLLoaderTrusted_Thunk(), PPB_URLLOADERTRUSTED_INTERFACE, INTERFACE_ID_NONE, // URL_LOADER is the canonical one. false, @@ -587,4 +585,4 @@ void PPB_URLLoader_Proxy::OnReadCallback(int32_t result, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_url_loader_proxy.h b/ppapi/proxy/ppb_url_loader_proxy.h index a42e492..7f2ec40 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.h +++ b/ppapi/proxy/ppb_url_loader_proxy.h @@ -19,7 +19,7 @@ struct PPB_URLLoader; struct PPB_URLLoaderTrusted; -namespace pp { +namespace ppapi { namespace proxy { struct PPBURLLoader_UpdateProgress_Params; @@ -86,8 +86,8 @@ class PPB_URLLoader_Proxy : public InterfaceProxy { // pointer. void OnReadCallback(int32_t result, ReadCallbackInfo* info); - CompletionCallbackFactory<PPB_URLLoader_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_URLLoader_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; // Valid only in the host, this lazily-initialized pointer indicates the // URLLoaderTrusted interface. @@ -95,6 +95,6 @@ class PPB_URLLoader_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ diff --git a/ppapi/proxy/ppb_url_request_info_proxy.cc b/ppapi/proxy/ppb_url_request_info_proxy.cc index 7b4152a..cf9dd3d 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.cc +++ b/ppapi/proxy/ppb_url_request_info_proxy.cc @@ -12,13 +12,11 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::PPB_URLRequestInfo_API; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -122,7 +120,7 @@ PPB_URLRequestInfo_Proxy::~PPB_URLRequestInfo_Proxy() { // static const InterfaceProxy::Info* PPB_URLRequestInfo_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(), + thunk::GetPPB_URLRequestInfo_Thunk(), PPB_URLREQUESTINFO_INTERFACE, INTERFACE_ID_PPB_URL_REQUEST_INFO, false, @@ -206,4 +204,4 @@ void PPB_URLRequestInfo_Proxy::OnMsgAppendFileToBody( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_url_request_info_proxy.h b/ppapi/proxy/ppb_url_request_info_proxy.h index b1df51d..e17ddb2 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.h +++ b/ppapi/proxy/ppb_url_request_info_proxy.h @@ -13,7 +13,7 @@ struct PPB_URLRequestInfo; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReceiveInput; @@ -49,6 +49,6 @@ class PPB_URLRequestInfo_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ diff --git a/ppapi/proxy/ppb_url_response_info_proxy.cc b/ppapi/proxy/ppb_url_response_info_proxy.cc index 710f6b0..5be2afe 100644 --- a/ppapi/proxy/ppb_url_response_info_proxy.cc +++ b/ppapi/proxy/ppb_url_response_info_proxy.cc @@ -15,11 +15,9 @@ #include "ppapi/thunk/ppb_url_response_info_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::PPB_URLResponseInfo_API; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -152,4 +150,4 @@ void PPB_URLResponseInfo_Proxy::OnMsgGetBodyAsFileRef( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_url_response_info_proxy.h b/ppapi/proxy/ppb_url_response_info_proxy.h index 9ef469b..9713256 100644 --- a/ppapi/proxy/ppb_url_response_info_proxy.h +++ b/ppapi/proxy/ppb_url_response_info_proxy.h @@ -14,7 +14,7 @@ struct PPB_URLResponseInfo; -namespace pp { +namespace ppapi { namespace proxy { struct PPBFileRef_CreateInfo; @@ -51,6 +51,6 @@ class PPB_URLResponseInfo_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_URL_RESPONSE_INFO_PROXY_H_ diff --git a/ppapi/proxy/ppb_url_util_proxy.cc b/ppapi/proxy/ppb_url_util_proxy.cc index 57e55be..7490a10 100644 --- a/ppapi/proxy/ppb_url_util_proxy.cc +++ b/ppapi/proxy/ppb_url_util_proxy.cc @@ -14,10 +14,7 @@ #include "ppapi/shared_impl/url_util_impl.h" #include "ppapi/shared_impl/var.h" -using ppapi::StringVar; -using ppapi::URLUtilImpl; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -213,5 +210,5 @@ void PPB_URLUtil_Proxy::OnMsgGetPluginInstanceURL( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_url_util_proxy.h b/ppapi/proxy/ppb_url_util_proxy.h index 548d2ef..2c6cb40 100644 --- a/ppapi/proxy/ppb_url_util_proxy.h +++ b/ppapi/proxy/ppb_url_util_proxy.h @@ -11,7 +11,7 @@ struct PPB_URLUtil_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPB_URLUtil_Proxy : public InterfaceProxy { @@ -48,7 +48,7 @@ class PPB_URLUtil_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_URL_UTIL_PROXY_H_ diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc index 709178f..ff32df1 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.cc +++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc @@ -21,9 +21,7 @@ #include "ppapi/proxy/serialized_var.h" #include "ppapi/shared_impl/var.h" -using ppapi::StringVar; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -490,7 +488,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgConstruct( } void PPB_Var_Deprecated_Proxy::OnMsgIsInstanceOfDeprecated( - pp::proxy::SerializedVarReceiveInput var, + SerializedVarReceiveInput var, int64 ppp_class, int64* ppp_class_data, PP_Bool* result) { @@ -522,4 +520,4 @@ void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.h b/ppapi/proxy/ppb_var_deprecated_proxy.h index 1e6a70c..d1a45a0 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.h +++ b/ppapi/proxy/ppb_var_deprecated_proxy.h @@ -13,7 +13,7 @@ struct PPB_Var_Deprecated; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVar; @@ -82,7 +82,7 @@ class PPB_Var_Deprecated_Proxy : public InterfaceProxy { SerializedVarVectorReceiveInput arg_vector, SerializedVarOutParam exception, SerializedVarReturnValue result); - void OnMsgIsInstanceOfDeprecated(pp::proxy::SerializedVarReceiveInput var, + void OnMsgIsInstanceOfDeprecated(SerializedVarReceiveInput var, int64 ppp_class, int64* ppp_class_data, PP_Bool* result); @@ -99,6 +99,6 @@ class PPB_Var_Deprecated_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ diff --git a/ppapi/proxy/ppb_var_proxy.cc b/ppapi/proxy/ppb_var_proxy.cc index 82ca00b..645e554 100644 --- a/ppapi/proxy/ppb_var_proxy.cc +++ b/ppapi/proxy/ppb_var_proxy.cc @@ -10,9 +10,7 @@ #include "ppapi/proxy/plugin_var_tracker.h" #include "ppapi/shared_impl/var.h" -using ppapi::StringVar; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -82,4 +80,4 @@ bool PPB_Var_Proxy::OnMessageReceived(const IPC::Message& msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_var_proxy.h b/ppapi/proxy/ppb_var_proxy.h index e527aab..6e060b9 100644 --- a/ppapi/proxy/ppb_var_proxy.h +++ b/ppapi/proxy/ppb_var_proxy.h @@ -9,7 +9,7 @@ struct PPB_Var; -namespace pp { +namespace ppapi { namespace proxy { class PPB_Var_Proxy : public InterfaceProxy { @@ -31,6 +31,6 @@ class PPB_Var_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_VAR_PROXY_H_ diff --git a/ppapi/proxy/ppb_var_unittest.cc b/ppapi/proxy/ppb_var_unittest.cc index a2e6794..485b599 100644 --- a/ppapi/proxy/ppb_var_unittest.cc +++ b/ppapi/proxy/ppb_var_unittest.cc @@ -21,7 +21,7 @@ std::string VarToString(const PP_Var& var, const PPB_Var* ppb_var) { } } // namespace -namespace pp { +namespace ppapi { namespace proxy { class PPB_VarTest : public PluginProxyTest { @@ -73,5 +73,5 @@ TEST_F(PPB_VarTest, Strings) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_video_capture_proxy.cc b/ppapi/proxy/ppb_video_capture_proxy.cc index a49b6e8..cae0b22 100644 --- a/ppapi/proxy/ppb_video_capture_proxy.cc +++ b/ppapi/proxy/ppb_video_capture_proxy.cc @@ -23,14 +23,12 @@ #include "ppapi/thunk/ppb_video_capture_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Buffer_API; using ppapi::thunk::PPB_BufferTrusted_API; using ppapi::thunk::PPB_VideoCapture_API; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -452,4 +450,4 @@ void PPP_VideoCapture_Proxy::OnMsgOnBufferReady( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_video_capture_proxy.h b/ppapi/proxy/ppb_video_capture_proxy.h index c324cd9..e882700 100644 --- a/ppapi/proxy/ppb_video_capture_proxy.h +++ b/ppapi/proxy/ppb_video_capture_proxy.h @@ -14,10 +14,9 @@ struct PPP_VideoCapture_Dev; struct PP_VideoCaptureDeviceInfo_Dev; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class PPB_VideoCapture_Proxy : public InterfaceProxy { @@ -75,6 +74,6 @@ class PPP_VideoCapture_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PPB_VIDEO_CAPTURE_PROXY_H_ diff --git a/ppapi/proxy/ppb_video_decoder_proxy.cc b/ppapi/proxy/ppb_video_decoder_proxy.cc index bcc0fc94..196d402 100644 --- a/ppapi/proxy/ppb_video_decoder_proxy.cc +++ b/ppapi/proxy/ppb_video_decoder_proxy.cc @@ -15,18 +15,15 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; -using ppapi::Resource; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Buffer_API; using ppapi::thunk::PPB_Context3D_API; using ppapi::thunk::PPB_VideoDecoder_API; -namespace pp { +namespace ppapi { namespace proxy { -class VideoDecoder : public Resource, - public ::ppapi::VideoDecoderImpl { +class VideoDecoder : public Resource, public VideoDecoderImpl { public: // You must call Init() before using this class. explicit VideoDecoder(const HostResource& resource); @@ -68,14 +65,14 @@ VideoDecoder::VideoDecoder(const HostResource& decoder) : Resource(decoder) { VideoDecoder::~VideoDecoder() { } -::ppapi::thunk::PPB_VideoDecoder_API* VideoDecoder::AsPPB_VideoDecoder_API() { +PPB_VideoDecoder_API* VideoDecoder::AsPPB_VideoDecoder_API() { return this; } int32_t VideoDecoder::Decode( const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, PP_CompletionCallback callback) { - ppapi::thunk::EnterResourceNoLock<PPB_Buffer_API> + EnterResourceNoLock<PPB_Buffer_API> enter_buffer(bitstream_buffer->data, true); if (enter_buffer.failed()) return PP_ERROR_BADRESOURCE; @@ -135,7 +132,7 @@ void VideoDecoder::Destroy() { FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_Destroy( INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource())); - ::ppapi::VideoDecoderImpl::Destroy(); + VideoDecoderImpl::Destroy(); } PluginDispatcher* VideoDecoder::GetDispatcher() const { @@ -176,7 +173,7 @@ PPB_VideoDecoder_Proxy::~PPB_VideoDecoder_Proxy() { // static const InterfaceProxy::Info* PPB_VideoDecoder_Proxy::GetInfo() { static const Info info = { - ::ppapi::thunk::GetPPB_VideoDecoder_Thunk(), + thunk::GetPPB_VideoDecoder_Thunk(), PPB_VIDEODECODER_DEV_INTERFACE, INTERFACE_ID_PPB_VIDEO_DECODER_DEV, false, @@ -218,11 +215,10 @@ PP_Resource PPB_VideoDecoder_Proxy::CreateProxyResource( return 0; std::vector<PP_VideoConfigElement> copied; - if (!ppapi::VideoDecoderImpl::CopyConfigsToVector(config, &copied)) + if (!VideoDecoderImpl::CopyConfigsToVector(config, &copied)) return 0; - ppapi::thunk::EnterResourceNoLock<PPB_Context3D_API> - enter_context(context3d_id, true); + EnterResourceNoLock<PPB_Context3D_API> enter_context(context3d_id, true); if (enter_context.failed()) return 0; Context3D* ppb_context = @@ -247,8 +243,8 @@ void PPB_VideoDecoder_Proxy::OnMsgCreate( PP_Instance instance, const HostResource& context3d_id, const std::vector<PP_VideoConfigElement>& config, HostResource* result) { - ::ppapi::thunk::EnterFunction< ::ppapi::thunk::ResourceCreationAPI> - resource_creation(instance, true); + thunk::EnterFunction<thunk::ResourceCreationAPI> resource_creation(instance, + true); if (resource_creation.failed()) return; @@ -264,7 +260,7 @@ void PPB_VideoDecoder_Proxy::OnMsgCreate( void PPB_VideoDecoder_Proxy::OnMsgDecode( const HostResource& decoder, const HostResource& buffer, int32 id, int32 size) { - CompletionCallback callback = callback_factory_.NewRequiredCallback( + pp::CompletionCallback callback = callback_factory_.NewRequiredCallback( &PPB_VideoDecoder_Proxy::SendMsgEndOfBitstreamACKToPlugin, decoder, id); PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size }; @@ -289,14 +285,14 @@ void PPB_VideoDecoder_Proxy::OnMsgReusePictureBuffer( } void PPB_VideoDecoder_Proxy::OnMsgFlush(const HostResource& decoder) { - CompletionCallback callback = callback_factory_.NewRequiredCallback( + pp::CompletionCallback callback = callback_factory_.NewRequiredCallback( &PPB_VideoDecoder_Proxy::SendMsgFlushACKToPlugin, decoder); ppb_video_decoder_target()->Flush( decoder.host_resource(), callback.pp_completion_callback()); } void PPB_VideoDecoder_Proxy::OnMsgReset(const HostResource& decoder) { - CompletionCallback callback = callback_factory_.NewRequiredCallback( + pp::CompletionCallback callback = callback_factory_.NewRequiredCallback( &PPB_VideoDecoder_Proxy::SendMsgResetACKToPlugin, decoder); ppb_video_decoder_target()->Reset( decoder.host_resource(), callback.pp_completion_callback()); @@ -346,4 +342,4 @@ void PPB_VideoDecoder_Proxy::OnMsgResetACK( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppb_video_decoder_proxy.h b/ppapi/proxy/ppb_video_decoder_proxy.h index d915d22..2b51bc2 100644 --- a/ppapi/proxy/ppb_video_decoder_proxy.h +++ b/ppapi/proxy/ppb_video_decoder_proxy.h @@ -12,7 +12,7 @@ #include "ppapi/shared_impl/video_decoder_impl.h" #include "ppapi/thunk/ppb_video_decoder_api.h" -namespace pp { +namespace ppapi { namespace proxy { class PPB_VideoDecoder_Proxy : public InterfaceProxy { @@ -69,13 +69,13 @@ class PPB_VideoDecoder_Proxy : public InterfaceProxy { void OnMsgFlushACK(const ppapi::HostResource& decoder, int32_t result); void OnMsgResetACK(const ppapi::HostResource& decoder, int32_t result); - CompletionCallbackFactory<PPB_VideoDecoder_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; + pp::CompletionCallbackFactory<PPB_VideoDecoder_Proxy, + ProxyNonThreadSafeRefCount> callback_factory_; DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Proxy); }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPB_VIDEO_DECODER_PROXY_H_ diff --git a/ppapi/proxy/ppp_class_proxy.cc b/ppapi/proxy/ppp_class_proxy.cc index 0a020cc..8ab109f 100644 --- a/ppapi/proxy/ppp_class_proxy.cc +++ b/ppapi/proxy/ppp_class_proxy.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -11,7 +11,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -243,7 +243,7 @@ void PPP_Class_Proxy::OnMsgGetProperty(int64 ppp_class, int64 object, void PPP_Class_Proxy::OnMsgEnumerateProperties( int64 ppp_class, int64 object, - std::vector<pp::proxy::SerializedVar>* props, + std::vector<SerializedVar>* props, SerializedVarOutParam exception) { NOTIMPLEMENTED(); // TODO(brettw) implement this. @@ -295,4 +295,4 @@ void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_class_proxy.h b/ppapi/proxy/ppp_class_proxy.h index 2cba23d..ce93770 100644 --- a/ppapi/proxy/ppp_class_proxy.h +++ b/ppapi/proxy/ppp_class_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -15,7 +15,7 @@ struct PPB_Var_Deprecated; struct PPP_Class_Deprecated; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVar; @@ -58,7 +58,7 @@ class PPP_Class_Proxy : public InterfaceProxy { SerializedVarReturnValue result); void OnMsgEnumerateProperties( int64 ppp_class, int64 object, - std::vector<pp::proxy::SerializedVar>* props, + std::vector<SerializedVar>* props, SerializedVarOutParam exception); void OnMsgSetProperty(int64 ppp_class, int64 object, SerializedVarReceiveInput property, @@ -82,6 +82,6 @@ class PPP_Class_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_CLASS_PROXY_H_ diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.cc b/ppapi/proxy/ppp_graphics_3d_proxy.cc index ef31e92b..2ca0231 100644 --- a/ppapi/proxy/ppp_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppp_graphics_3d_proxy.cc @@ -9,7 +9,7 @@ #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -67,4 +67,4 @@ void PPP_Graphics3D_Proxy::OnMsgContextLost(PP_Instance instance) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.h b/ppapi/proxy/ppp_graphics_3d_proxy.h index 4f1af56..8d9fac3 100644 --- a/ppapi/proxy/ppp_graphics_3d_proxy.h +++ b/ppapi/proxy/ppp_graphics_3d_proxy.h @@ -11,7 +11,7 @@ struct PPP_Graphics3D_Dev; -namespace pp { +namespace ppapi { namespace proxy { class PPP_Graphics3D_Proxy : public InterfaceProxy { @@ -34,6 +34,6 @@ class PPP_Graphics3D_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_ diff --git a/ppapi/proxy/ppp_input_event_proxy.cc b/ppapi/proxy/ppp_input_event_proxy.cc index 1a1945d..fce2ca5 100644 --- a/ppapi/proxy/ppp_input_event_proxy.cc +++ b/ppapi/proxy/ppp_input_event_proxy.cc @@ -15,11 +15,10 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_input_event_api.h" -using ppapi::InputEventData; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_InputEvent_API; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -112,4 +111,4 @@ void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_input_event_proxy.h b/ppapi/proxy/ppp_input_event_proxy.h index b294aa5..e286250 100644 --- a/ppapi/proxy/ppp_input_event_proxy.h +++ b/ppapi/proxy/ppp_input_event_proxy.h @@ -11,10 +11,9 @@ struct PPP_InputEvent; namespace ppapi { + struct InputEventData; -} -namespace pp { namespace proxy { class PPP_InputEvent_Proxy : public InterfaceProxy { @@ -41,6 +40,6 @@ class PPP_InputEvent_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ diff --git a/ppapi/proxy/ppp_instance_private_proxy.cc b/ppapi/proxy/ppp_instance_private_proxy.cc index 20beb8a..4ecd6a6 100644 --- a/ppapi/proxy/ppp_instance_private_proxy.cc +++ b/ppapi/proxy/ppp_instance_private_proxy.cc @@ -13,7 +13,7 @@ #include "ppapi/proxy/plugin_resource_tracker.h" #include "ppapi/proxy/ppapi_messages.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -75,4 +75,4 @@ void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_instance_private_proxy.h b/ppapi/proxy/ppp_instance_private_proxy.h index f981167..afab722 100644 --- a/ppapi/proxy/ppp_instance_private_proxy.h +++ b/ppapi/proxy/ppp_instance_private_proxy.h @@ -13,7 +13,7 @@ struct PPP_Instance_Private; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReturnValue; @@ -40,6 +40,6 @@ class PPP_Instance_Private_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_INSTANCE_PRIVATE_PROXY_H_ diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc index 612fb77..1da10be 100644 --- a/ppapi/proxy/ppp_instance_proxy.cc +++ b/ppapi/proxy/ppp_instance_proxy.cc @@ -16,9 +16,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppb_url_loader_proxy.h" -using ppapi::HostResource; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -227,4 +225,4 @@ void PPP_Instance_Proxy::OnMsgHandleDocumentLoad(PP_Instance instance, } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_instance_proxy.h b/ppapi/proxy/ppp_instance_proxy.h index 1ff2f8b..f9b471c 100644 --- a/ppapi/proxy/ppp_instance_proxy.h +++ b/ppapi/proxy/ppp_instance_proxy.h @@ -18,7 +18,7 @@ struct PP_Rect; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReturnValue; @@ -29,15 +29,14 @@ class PPP_Instance_Proxy : public InterfaceProxy { PPP_Instance_Proxy(Dispatcher* dispatcher, const PPP_Instance_Type* target_interface) : InterfaceProxy(dispatcher, static_cast<const void*>(target_interface)), - combined_interface_( - new ::ppapi::PPP_Instance_Combined(*target_interface)) { + combined_interface_(new PPP_Instance_Combined(*target_interface)) { } virtual ~PPP_Instance_Proxy(); // Return the info for the 1.0 (latest, canonical) version of the interface. static const Info* GetInfo1_0(); - ::ppapi::PPP_Instance_Combined* ppp_instance_target() const { + PPP_Instance_Combined* ppp_instance_target() const { return combined_interface_.get(); } @@ -57,12 +56,12 @@ class PPP_Instance_Proxy : public InterfaceProxy { PP_Bool fullscreen); void OnMsgDidChangeFocus(PP_Instance instance, PP_Bool has_focus); void OnMsgHandleDocumentLoad(PP_Instance instance, - const ppapi::HostResource& url_loader, + const HostResource& url_loader, PP_Bool* result); - scoped_ptr< ::ppapi::PPP_Instance_Combined> combined_interface_; + scoped_ptr<PPP_Instance_Combined> combined_interface_; }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ diff --git a/ppapi/proxy/ppp_instance_proxy_test.cc b/ppapi/proxy/ppp_instance_proxy_test.cc index c49f1a2..dbc749d 100644 --- a/ppapi/proxy/ppp_instance_proxy_test.cc +++ b/ppapi/proxy/ppp_instance_proxy_test.cc @@ -12,7 +12,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppapi_proxy_test.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -181,5 +181,5 @@ TEST_F(PPP_Instance_ProxyTest, PPPInstance1_0) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_messaging_proxy.cc b/ppapi/proxy/ppp_messaging_proxy.cc index a0f467f..59f4574 100644 --- a/ppapi/proxy/ppp_messaging_proxy.cc +++ b/ppapi/proxy/ppp_messaging_proxy.cc @@ -13,7 +13,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -84,4 +84,4 @@ void PPP_Messaging_Proxy::OnMsgHandleMessage( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_messaging_proxy.h b/ppapi/proxy/ppp_messaging_proxy.h index a8b396a..2deb40f 100644 --- a/ppapi/proxy/ppp_messaging_proxy.h +++ b/ppapi/proxy/ppp_messaging_proxy.h @@ -10,7 +10,7 @@ struct PPP_Messaging; -namespace pp { +namespace ppapi { namespace proxy { class SerializedVarReceiveInput; @@ -36,6 +36,6 @@ class PPP_Messaging_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_MESSAGING_PROXY_H_ diff --git a/ppapi/proxy/ppp_messaging_proxy_test.cc b/ppapi/proxy/ppp_messaging_proxy_test.cc index ac433a8..839a7ef 100644 --- a/ppapi/proxy/ppp_messaging_proxy_test.cc +++ b/ppapi/proxy/ppp_messaging_proxy_test.cc @@ -11,9 +11,7 @@ #include "ppapi/proxy/ppapi_proxy_test.h" #include "ppapi/shared_impl/var.h" -using ::ppapi::StringVar; - -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -140,5 +138,5 @@ TEST_F(PPP_Messaging_ProxyTest, SendMessages) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_video_decoder_proxy.cc b/ppapi/proxy/ppp_video_decoder_proxy.cc index ddfc0c3..35a29c0 100644 --- a/ppapi/proxy/ppp_video_decoder_proxy.cc +++ b/ppapi/proxy/ppp_video_decoder_proxy.cc @@ -12,10 +12,9 @@ #include "ppapi/thunk/ppb_video_decoder_api.h" #include "ppapi/thunk/thunk.h" -using ppapi::HostResource; using ppapi::thunk::PPB_VideoDecoder_API; -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -167,4 +166,4 @@ void PPP_VideoDecoder_Proxy::OnMsgNotifyError( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/ppp_video_decoder_proxy.h b/ppapi/proxy/ppp_video_decoder_proxy.h index 9e3eab6..84346ba 100644 --- a/ppapi/proxy/ppp_video_decoder_proxy.h +++ b/ppapi/proxy/ppp_video_decoder_proxy.h @@ -13,7 +13,7 @@ struct PP_Picture_Dev; struct PP_Size; -namespace pp { +namespace ppapi { namespace proxy { class PPP_VideoDecoder_Proxy : public InterfaceProxy { @@ -47,6 +47,6 @@ class PPP_VideoDecoder_Proxy : public InterfaceProxy { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_ diff --git a/ppapi/proxy/proxy_channel.cc b/ppapi/proxy/proxy_channel.cc index c7b1ecfe..18e8651 100644 --- a/ppapi/proxy/proxy_channel.cc +++ b/ppapi/proxy/proxy_channel.cc @@ -7,7 +7,7 @@ #include "ipc/ipc_platform_file.h" #include "ipc/ipc_test_sink.h" -namespace pp { +namespace ppapi { namespace proxy { ProxyChannel::ProxyChannel(base::ProcessHandle remote_process_handle) @@ -66,4 +66,4 @@ bool ProxyChannel::Send(IPC::Message* msg) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/proxy_channel.h b/ppapi/proxy/proxy_channel.h index 3dbb977..2aba843 100644 --- a/ppapi/proxy/proxy_channel.h +++ b/ppapi/proxy/proxy_channel.h @@ -20,7 +20,7 @@ namespace IPC { class TestSink; } -namespace pp { +namespace ppapi { namespace proxy { class VarSerializationRules; @@ -105,6 +105,6 @@ class ProxyChannel : public IPC::Channel::Listener, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ diff --git a/ppapi/proxy/proxy_module.cc b/ppapi/proxy/proxy_module.cc index 94de0c1..885552d 100644 --- a/ppapi/proxy/proxy_module.cc +++ b/ppapi/proxy/proxy_module.cc @@ -6,7 +6,7 @@ #include "base/memory/singleton.h" -namespace pp { +namespace ppapi { namespace proxy { ProxyModule::ProxyModule() { @@ -29,4 +29,4 @@ void ProxyModule::SetFlashCommandLineArgs(const std::string& args) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/proxy_module.h b/ppapi/proxy/proxy_module.h index 5b2e540..2bcb367 100644 --- a/ppapi/proxy/proxy_module.h +++ b/ppapi/proxy/proxy_module.h @@ -11,7 +11,7 @@ template<typename T> struct DefaultSingletonTraits; -namespace pp { +namespace ppapi { namespace proxy { class PluginDispatcher; @@ -39,6 +39,6 @@ class ProxyModule { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PROXY_MODULE_H_ diff --git a/ppapi/proxy/proxy_non_thread_safe_ref_count.h b/ppapi/proxy/proxy_non_thread_safe_ref_count.h index cfcb720..855c87c 100644 --- a/ppapi/proxy/proxy_non_thread_safe_ref_count.h +++ b/ppapi/proxy/proxy_non_thread_safe_ref_count.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,7 +8,7 @@ #include "base/message_loop.h" #include "ppapi/cpp/completion_callback.h" -namespace pp { +namespace ppapi { namespace proxy { // This class is just like ppapi/cpp/non_thread_safe_ref_count.h but rather @@ -44,6 +44,6 @@ class ProxyNonThreadSafeRefCount { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ diff --git a/ppapi/proxy/proxy_object_var.cc b/ppapi/proxy/proxy_object_var.cc index 7d53e33..4a12302 100644 --- a/ppapi/proxy/proxy_object_var.cc +++ b/ppapi/proxy/proxy_object_var.cc @@ -7,7 +7,7 @@ #include "base/logging.h" #include "ppapi/c/pp_var.h" -using pp::proxy::PluginDispatcher; +using ppapi::proxy::PluginDispatcher; namespace ppapi { diff --git a/ppapi/proxy/proxy_object_var.h b/ppapi/proxy/proxy_object_var.h index c07177e..e8d7aed 100644 --- a/ppapi/proxy/proxy_object_var.h +++ b/ppapi/proxy/proxy_object_var.h @@ -8,20 +8,18 @@ #include "base/compiler_specific.h" #include "ppapi/shared_impl/var.h" -namespace pp { +namespace ppapi { + namespace proxy { class PluginDispatcher; } // namespace proxy -} // namespace pp - -namespace ppapi { // Tracks a reference to an object var in the plugin side of the proxy. This // just stores the dispatcher and host var ID, and provides the interface for // integrating this with PP_Var creation. class ProxyObjectVar : public Var { public: - ProxyObjectVar(pp::proxy::PluginDispatcher* dispatcher, + ProxyObjectVar(proxy::PluginDispatcher* dispatcher, int32 host_var_id); virtual ~ProxyObjectVar(); @@ -31,7 +29,7 @@ class ProxyObjectVar : public Var { virtual PP_Var GetPPVar() OVERRIDE; virtual PP_VarType GetType() const OVERRIDE; - pp::proxy::PluginDispatcher* dispatcher() const { return dispatcher_; } + proxy::PluginDispatcher* dispatcher() const { return dispatcher_; } int32 host_var_id() const { return host_var_id_; } // Expose AssignVarID on Var so the PluginResourceTracker can call us when @@ -39,7 +37,7 @@ class ProxyObjectVar : public Var { void AssignVarID(int32 id); private: - pp::proxy::PluginDispatcher* dispatcher_; + proxy::PluginDispatcher* dispatcher_; int32 host_var_id_; DISALLOW_COPY_AND_ASSIGN(ProxyObjectVar); diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index 4ba7cd1..25066f9 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -40,12 +40,9 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_image_data_api.h" -using ppapi::HostResource; -using ppapi::InputEventData; -using ppapi::StringVar; using ppapi::thunk::ResourceCreationAPI; -namespace pp { +namespace ppapi { namespace proxy { ResourceCreationProxy::ResourceCreationProxy(Dispatcher* dispatcher) @@ -395,7 +392,7 @@ void ResourceCreationProxy::OnMsgCreateImageData( int32_t handle; if (trusted->GetSharedMemory(resource, &handle, &byte_count) == PP_OK) { #if defined(OS_WIN) - pp::proxy::ImageHandle ih = ImageData::HandleFromInt(handle); + ImageHandle ih = ImageData::HandleFromInt(handle); *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); #else *result_image_handle = ImageData::HandleFromInt(handle); @@ -405,4 +402,4 @@ void ResourceCreationProxy::OnMsgCreateImageData( } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h index db5ab94..88b0caa 100644 --- a/ppapi/proxy/resource_creation_proxy.h +++ b/ppapi/proxy/resource_creation_proxy.h @@ -18,23 +18,22 @@ struct PP_Size; namespace ppapi { + class HostResource; -} -namespace pp { namespace proxy { class Dispatcher; -class ResourceCreationProxy : public ::ppapi::FunctionGroupBase, - public ::ppapi::thunk::ResourceCreationAPI, - public ::IPC::Channel::Listener, +class ResourceCreationProxy : public FunctionGroupBase, + public thunk::ResourceCreationAPI, + public IPC::Channel::Listener, public IPC::Message::Sender { public: explicit ResourceCreationProxy(Dispatcher* dispatcher); virtual ~ResourceCreationProxy(); - virtual ::ppapi::thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE; + virtual thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE; // ResourceCreationAPI (called in plugin). virtual PP_Resource CreateAudio(PP_Instance instance, @@ -133,16 +132,16 @@ class ResourceCreationProxy : public ::ppapi::FunctionGroupBase, void OnMsgCreateAudio(PP_Instance instance, int32_t sample_rate, uint32_t sample_frame_count, - ppapi::HostResource* result); + HostResource* result); void OnMsgCreateGraphics2D(PP_Instance instance, const PP_Size& size, PP_Bool is_always_opaque, - ppapi::HostResource* result); + HostResource* result); void OnMsgCreateImageData(PP_Instance instance, int32_t format, const PP_Size& size, PP_Bool init_to_zero, - ppapi::HostResource* result, + HostResource* result, std::string* image_data_desc, ImageHandle* result_image_handle); @@ -152,6 +151,6 @@ class ResourceCreationProxy : public ::ppapi::FunctionGroupBase, }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ diff --git a/ppapi/proxy/serialized_flash_menu.cc b/ppapi/proxy/serialized_flash_menu.cc index c7ef5ab..c29f9c1 100644 --- a/ppapi/proxy/serialized_flash_menu.cc +++ b/ppapi/proxy/serialized_flash_menu.cc @@ -8,7 +8,7 @@ #include "ppapi/c/private/ppb_flash_menu.h" #include "ppapi/proxy/ppapi_param_traits.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -169,4 +169,4 @@ bool SerializedFlashMenu::ReadFromMessage(const IPC::Message* m, void** iter) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/serialized_flash_menu.h b/ppapi/proxy/serialized_flash_menu.h index 84b7bb9..9b8bed8 100644 --- a/ppapi/proxy/serialized_flash_menu.h +++ b/ppapi/proxy/serialized_flash_menu.h @@ -17,7 +17,7 @@ namespace IPC { class Message; } -namespace pp { +namespace ppapi { namespace proxy { class SerializedFlashMenu { @@ -39,6 +39,6 @@ class SerializedFlashMenu { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_SERIALIZED_FLASH_MENU_H_ diff --git a/ppapi/proxy/serialized_structs.cc b/ppapi/proxy/serialized_structs.cc index 71c7376..4fd62ca 100644 --- a/ppapi/proxy/serialized_structs.cc +++ b/ppapi/proxy/serialized_structs.cc @@ -8,7 +8,7 @@ #include "ppapi/c/pp_file_info.h" #include "ppapi/c/pp_rect.h" -namespace pp { +namespace ppapi { namespace proxy { SerializedFontDescription::SerializedFontDescription() @@ -82,4 +82,4 @@ PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params() PPBFlash_DrawGlyphs_Params::~PPBFlash_DrawGlyphs_Params() {} } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h index dac6540..159ee39 100644 --- a/ppapi/proxy/serialized_structs.h +++ b/ppapi/proxy/serialized_structs.h @@ -20,7 +20,7 @@ struct PP_FontDescription_Dev; -namespace pp { +namespace ppapi { namespace proxy { class Dispatcher; @@ -55,7 +55,7 @@ struct SerializedFontDescription { PP_FontDescription_Dev* desc, bool dest_owns_ref) const; - pp::proxy::SerializedVar face; + SerializedVar face; int32_t family; uint32_t size; int32_t weight; @@ -129,6 +129,6 @@ typedef int ImageHandle; #endif } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ diff --git a/ppapi/proxy/serialized_var.cc b/ppapi/proxy/serialized_var.cc index ffae1b8..afd493f 100644 --- a/ppapi/proxy/serialized_var.cc +++ b/ppapi/proxy/serialized_var.cc @@ -11,7 +11,7 @@ #include "ppapi/proxy/ppapi_param_traits.h" #include "ppapi/proxy/var_serialization_rules.h" -namespace pp { +namespace ppapi { namespace proxy { // SerializedVar::Inner -------------------------------------------------------- @@ -540,5 +540,5 @@ SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/serialized_var.h b/ppapi/proxy/serialized_var.h index 6512911..30a27fd 100644 --- a/ppapi/proxy/serialized_var.h +++ b/ppapi/proxy/serialized_var.h @@ -16,7 +16,7 @@ namespace IPC { class Message; } -namespace pp { +namespace ppapi { namespace proxy { class Dispatcher; @@ -455,7 +455,7 @@ class SerializedVarTestReader : public SerializedVar { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_SERIALIZED_VAR_H_ diff --git a/ppapi/proxy/serialized_var_unittest.cc b/ppapi/proxy/serialized_var_unittest.cc index 34842c5..8ad6c99 100644 --- a/ppapi/proxy/serialized_var_unittest.cc +++ b/ppapi/proxy/serialized_var_unittest.cc @@ -6,7 +6,7 @@ #include "ppapi/proxy/serialized_var.h" -namespace pp { +namespace ppapi { namespace proxy { namespace { @@ -188,4 +188,4 @@ TEST_F(SerializedVarTest, PluginReturnValue) { } } // namespace proxy -} // namespace pp +} // namespace ppapi diff --git a/ppapi/proxy/var_serialization_rules.h b/ppapi/proxy/var_serialization_rules.h index 67d3db2..b77e834 100644 --- a/ppapi/proxy/var_serialization_rules.h +++ b/ppapi/proxy/var_serialization_rules.h @@ -9,7 +9,7 @@ #include <string> -namespace pp { +namespace ppapi { namespace proxy { class Dispatcher; @@ -88,6 +88,6 @@ class VarSerializationRules { }; } // namespace proxy -} // namespace pp +} // namespace ppapi #endif // PPAPI_PROXY_VAR_SERIALIZATION_RULES_H_ |