summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 00:01:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 00:01:30 +0000
commit56d7ad42237c35d2b7653c7cad89e9ca6ea75d68 (patch)
treeb16971de9045c0f3524566b5a242bef0ac0ab1db /ppapi/shared_impl
parentf26d7fa665143e0bf1c173e093f9eadce0a10e97 (diff)
downloadchromium_src-56d7ad42237c35d2b7653c7cad89e9ca6ea75d68.zip
chromium_src-56d7ad42237c35d2b7653c7cad89e9ca6ea75d68.tar.gz
chromium_src-56d7ad42237c35d2b7653c7cad89e9ca6ea75d68.tar.bz2
Revert 113290 - Rename the shared_impl resource files to give them more regular names.
I keep getting confused between things like AudioImpl and PPB_Audio_Impl. This uses _shared for the names, so now we have _impl, _proxy, and _shared which makes more sense. I also removed the ppb_opengles2_impl file since it was just a forward to the shared version. BUG= TEST= Review URL: http://codereview.chromium.org/8790004 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/8824015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r--ppapi/shared_impl/audio_config_impl.cc (renamed from ppapi/shared_impl/ppb_audio_config_shared.cc)38
-rw-r--r--ppapi/shared_impl/audio_config_impl.h (renamed from ppapi/shared_impl/ppb_audio_config_shared.h)18
-rw-r--r--ppapi/shared_impl/audio_impl.cc (renamed from ppapi/shared_impl/ppb_audio_shared.cc)24
-rw-r--r--ppapi/shared_impl/audio_impl.h (renamed from ppapi/shared_impl/ppb_audio_shared.h)14
-rw-r--r--ppapi/shared_impl/audio_input_impl.cc (renamed from ppapi/shared_impl/ppb_audio_input_shared.cc)20
-rw-r--r--ppapi/shared_impl/audio_input_impl.h (renamed from ppapi/shared_impl/ppb_audio_input_shared.h)15
-rw-r--r--ppapi/shared_impl/char_set_impl.cc (renamed from ppapi/shared_impl/ppb_char_set_shared.cc)24
-rw-r--r--ppapi/shared_impl/char_set_impl.h (renamed from ppapi/shared_impl/ppb_char_set_shared.h)8
-rw-r--r--ppapi/shared_impl/crypto_impl.cc (renamed from ppapi/shared_impl/ppb_crypto_shared.cc)0
-rw-r--r--ppapi/shared_impl/file_ref_impl.cc (renamed from ppapi/shared_impl/ppb_file_ref_shared.cc)20
-rw-r--r--ppapi/shared_impl/file_ref_impl.h (renamed from ppapi/shared_impl/ppb_file_ref_shared.h)19
-rw-r--r--ppapi/shared_impl/font_impl.cc (renamed from ppapi/shared_impl/ppb_font_shared.cc)5
-rw-r--r--ppapi/shared_impl/font_impl.h (renamed from ppapi/shared_impl/ppb_font_shared.h)10
-rw-r--r--ppapi/shared_impl/graphics_3d_impl.cc (renamed from ppapi/shared_impl/ppb_graphics_3d_shared.cc)44
-rw-r--r--ppapi/shared_impl/graphics_3d_impl.h (renamed from ppapi/shared_impl/ppb_graphics_3d_shared.h)9
-rw-r--r--ppapi/shared_impl/image_data_impl.cc (renamed from ppapi/shared_impl/ppb_image_data_shared.cc)7
-rw-r--r--ppapi/shared_impl/image_data_impl.h (renamed from ppapi/shared_impl/ppb_image_data_shared.h)8
-rw-r--r--ppapi/shared_impl/input_event_impl.cc (renamed from ppapi/shared_impl/ppb_input_event_shared.cc)50
-rw-r--r--ppapi/shared_impl/input_event_impl.h (renamed from ppapi/shared_impl/ppb_input_event_shared.h)22
-rw-r--r--ppapi/shared_impl/instance_impl.cc (renamed from ppapi/shared_impl/ppb_instance_shared.cc)9
-rw-r--r--ppapi/shared_impl/instance_impl.h (renamed from ppapi/shared_impl/ppb_instance_shared.h)10
-rw-r--r--ppapi/shared_impl/memory_impl.cc (renamed from ppapi/shared_impl/ppb_memory_shared.cc)0
-rw-r--r--ppapi/shared_impl/opengles2_impl.cc (renamed from ppapi/shared_impl/ppb_opengles2_shared.cc)8
-rw-r--r--ppapi/shared_impl/opengles2_impl.h (renamed from ppapi/shared_impl/ppb_opengles2_shared.h)8
-rw-r--r--ppapi/shared_impl/url_request_info_impl.cc (renamed from ppapi/shared_impl/ppb_url_request_info_shared.cc)46
-rw-r--r--ppapi/shared_impl/url_request_info_impl.h (renamed from ppapi/shared_impl/ppb_url_request_info_shared.h)16
-rw-r--r--ppapi/shared_impl/url_util_impl.cc (renamed from ppapi/shared_impl/ppb_url_util_shared.cc)24
-rw-r--r--ppapi/shared_impl/url_util_impl.h (renamed from ppapi/shared_impl/ppb_url_util_shared.h)8
-rw-r--r--ppapi/shared_impl/video_decoder_impl.cc (renamed from ppapi/shared_impl/ppb_video_decoder_shared.cc)24
-rw-r--r--ppapi/shared_impl/video_decoder_impl.h (renamed from ppapi/shared_impl/ppb_video_decoder_shared.h)14
30 files changed, 245 insertions, 277 deletions
diff --git a/ppapi/shared_impl/ppb_audio_config_shared.cc b/ppapi/shared_impl/audio_config_impl.cc
index 78df9ad..843f2d1 100644
--- a/ppapi/shared_impl/ppb_audio_config_shared.cc
+++ b/ppapi/shared_impl/audio_config_impl.cc
@@ -2,64 +2,60 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_audio_config_shared.h"
+#include "ppapi/shared_impl/audio_config_impl.h"
namespace ppapi {
-PPB_AudioConfig_Shared::PPB_AudioConfig_Shared(PP_Instance instance)
+AudioConfigImpl::AudioConfigImpl(PP_Instance instance)
: Resource(instance),
sample_rate_(PP_AUDIOSAMPLERATE_NONE),
sample_frame_count_(0) {
}
-PPB_AudioConfig_Shared::PPB_AudioConfig_Shared(
- const HostResource& host_resource)
+AudioConfigImpl::AudioConfigImpl(const HostResource& host_resource)
: Resource(host_resource),
sample_rate_(PP_AUDIOSAMPLERATE_NONE),
sample_frame_count_(0) {
}
-PPB_AudioConfig_Shared::~PPB_AudioConfig_Shared() {
+AudioConfigImpl::~AudioConfigImpl() {
}
// static
-PP_Resource PPB_AudioConfig_Shared::CreateAsImpl(
- PP_Instance instance,
- PP_AudioSampleRate sample_rate,
- uint32_t sample_frame_count) {
- scoped_refptr<PPB_AudioConfig_Shared> object(
- new PPB_AudioConfig_Shared(instance));
+PP_Resource AudioConfigImpl::CreateAsImpl(PP_Instance instance,
+ PP_AudioSampleRate sample_rate,
+ uint32_t sample_frame_count) {
+ scoped_refptr<AudioConfigImpl> object(new AudioConfigImpl(instance));
if (!object->Init(sample_rate, sample_frame_count))
return 0;
return object->GetReference();
}
// static
-PP_Resource PPB_AudioConfig_Shared::CreateAsProxy(
- PP_Instance instance,
- PP_AudioSampleRate sample_rate,
- uint32_t sample_frame_count) {
- scoped_refptr<PPB_AudioConfig_Shared> object(new PPB_AudioConfig_Shared(
+PP_Resource AudioConfigImpl::CreateAsProxy(PP_Instance instance,
+ PP_AudioSampleRate sample_rate,
+ uint32_t sample_frame_count) {
+ scoped_refptr<AudioConfigImpl> object(new AudioConfigImpl(
HostResource::MakeInstanceOnly(instance)));
if (!object->Init(sample_rate, sample_frame_count))
return 0;
return object->GetReference();
}
-thunk::PPB_AudioConfig_API* PPB_AudioConfig_Shared::AsPPB_AudioConfig_API() {
+thunk::PPB_AudioConfig_API* AudioConfigImpl::AsPPB_AudioConfig_API() {
return this;
}
-PP_AudioSampleRate PPB_AudioConfig_Shared::GetSampleRate() {
+PP_AudioSampleRate AudioConfigImpl::GetSampleRate() {
return sample_rate_;
}
-uint32_t PPB_AudioConfig_Shared::GetSampleFrameCount() {
+uint32_t AudioConfigImpl::GetSampleFrameCount() {
return sample_frame_count_;
}
-bool PPB_AudioConfig_Shared::Init(PP_AudioSampleRate sample_rate,
- uint32_t sample_frame_count) {
+bool AudioConfigImpl::Init(PP_AudioSampleRate sample_rate,
+ uint32_t sample_frame_count) {
// TODO(brettw): Currently we don't actually check what the hardware
// supports, so just allow sample rates of the "guaranteed working" ones.
if (sample_rate != PP_AUDIOSAMPLERATE_44100 &&
diff --git a/ppapi/shared_impl/ppb_audio_config_shared.h b/ppapi/shared_impl/audio_config_impl.h
index 65e3b2b..7577e00 100644
--- a/ppapi/shared_impl/ppb_audio_config_shared.h
+++ b/ppapi/shared_impl/audio_config_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_AUDIO_CONFIG_IMPL_H_
+#define PPAPI_SHARED_IMPL_AUDIO_CONFIG_IMPL_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -12,11 +12,11 @@
namespace ppapi {
-class PPAPI_SHARED_EXPORT PPB_AudioConfig_Shared
+class PPAPI_SHARED_EXPORT AudioConfigImpl
: public Resource,
public thunk::PPB_AudioConfig_API {
public:
- virtual ~PPB_AudioConfig_Shared();
+ virtual ~AudioConfigImpl();
static PP_Resource CreateAsImpl(PP_Instance instance,
PP_AudioSampleRate sample_rate,
@@ -34,10 +34,8 @@ class PPAPI_SHARED_EXPORT PPB_AudioConfig_Shared
private:
// You must call Init before using this object.
- // Construct as implementation.
- explicit PPB_AudioConfig_Shared(PP_Instance instance);
- // Construct as proxy.
- explicit PPB_AudioConfig_Shared(const HostResource& host_resource);
+ explicit AudioConfigImpl(PP_Instance instance); // Impl c'tor.
+ explicit AudioConfigImpl(const HostResource& host_resource); // Proxy c'tor.
// Returns false if the arguments are invalid, the object should not be
// used in this case.
@@ -46,9 +44,9 @@ class PPAPI_SHARED_EXPORT PPB_AudioConfig_Shared
PP_AudioSampleRate sample_rate_;
uint32_t sample_frame_count_;
- DISALLOW_COPY_AND_ASSIGN(PPB_AudioConfig_Shared);
+ DISALLOW_COPY_AND_ASSIGN(AudioConfigImpl);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_AUDIO_CONFIG_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_audio_shared.cc b/ppapi/shared_impl/audio_impl.cc
index 5385106..b684ab1 100644
--- a/ppapi/shared_impl/ppb_audio_shared.cc
+++ b/ppapi/shared_impl/audio_impl.cc
@@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_audio_shared.h"
+#include "ppapi/shared_impl/audio_impl.h"
#include "base/logging.h"
namespace ppapi {
-PPB_Audio_Shared::PPB_Audio_Shared()
+AudioImpl::AudioImpl()
: playing_(false),
shared_memory_size_(0),
callback_(NULL),
user_data_(NULL) {
}
-PPB_Audio_Shared::~PPB_Audio_Shared() {
+AudioImpl::~AudioImpl() {
// Closing the socket causes the thread to exit - wait for it.
if (socket_.get())
socket_->Close();
@@ -25,13 +25,12 @@ PPB_Audio_Shared::~PPB_Audio_Shared() {
}
}
-void PPB_Audio_Shared::SetCallback(PPB_Audio_Callback callback,
- void* user_data) {
+void AudioImpl::SetCallback(PPB_Audio_Callback callback, void* user_data) {
callback_ = callback;
user_data_ = user_data;
}
-void PPB_Audio_Shared::SetStartPlaybackState() {
+void AudioImpl::SetStartPlaybackState() {
DCHECK(!playing_);
DCHECK(!audio_thread_.get());
@@ -45,7 +44,7 @@ void PPB_Audio_Shared::SetStartPlaybackState() {
playing_ = true;
}
-void PPB_Audio_Shared::SetStopPlaybackState() {
+void AudioImpl::SetStopPlaybackState() {
DCHECK(playing_);
if (audio_thread_.get()) {
@@ -55,10 +54,9 @@ void PPB_Audio_Shared::SetStopPlaybackState() {
playing_ = false;
}
-void PPB_Audio_Shared::SetStreamInfo(
- base::SharedMemoryHandle shared_memory_handle,
- size_t shared_memory_size,
- base::SyncSocket::Handle socket_handle) {
+void AudioImpl::SetStreamInfo(base::SharedMemoryHandle shared_memory_handle,
+ size_t shared_memory_size,
+ base::SyncSocket::Handle socket_handle) {
socket_.reset(new base::SyncSocket(socket_handle));
shared_memory_.reset(new base::SharedMemory(shared_memory_handle, false));
shared_memory_size_ = shared_memory_size;
@@ -72,7 +70,7 @@ void PPB_Audio_Shared::SetStreamInfo(
}
}
-void PPB_Audio_Shared::StartThread() {
+void AudioImpl::StartThread() {
DCHECK(callback_);
DCHECK(!audio_thread_.get());
audio_thread_.reset(new base::DelegateSimpleThread(
@@ -80,7 +78,7 @@ void PPB_Audio_Shared::StartThread() {
audio_thread_->Start();
}
-void PPB_Audio_Shared::Run() {
+void AudioImpl::Run() {
int pending_data;
void* buffer = shared_memory_->memory();
diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/audio_impl.h
index 99f45de..201582d 100644
--- a/ppapi/shared_impl/ppb_audio_shared.h
+++ b/ppapi/shared_impl/audio_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_AUDIO_IMPL_H_
+#define PPAPI_SHARED_IMPL_AUDIO_IMPL_H_
#include "base/memory/scoped_ptr.h"
#include "base/shared_memory.h"
@@ -18,12 +18,12 @@ namespace ppapi {
// Implements the logic to map shared memory and run the audio thread signaled
// from the sync socket. Both the proxy and the renderer implementation use
// this code.
-class PPAPI_SHARED_EXPORT PPB_Audio_Shared
+class PPAPI_SHARED_EXPORT AudioImpl
: public thunk::PPB_Audio_API,
public base::DelegateSimpleThread::Delegate {
public:
- PPB_Audio_Shared();
- virtual ~PPB_Audio_Shared();
+ AudioImpl();
+ virtual ~AudioImpl();
bool playing() const { return playing_; }
@@ -80,10 +80,8 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared
// User data pointer passed verbatim to the callback function.
void* user_data_;
-
- DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_AUDIO_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_audio_input_shared.cc b/ppapi/shared_impl/audio_input_impl.cc
index ae5b37e..659cd47 100644
--- a/ppapi/shared_impl/ppb_audio_input_shared.cc
+++ b/ppapi/shared_impl/audio_input_impl.cc
@@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_audio_input_shared.h"
+#include "ppapi/shared_impl/audio_input_impl.h"
#include "base/logging.h"
namespace ppapi {
-PPB_AudioInput_Shared::PPB_AudioInput_Shared()
+AudioInputImpl::AudioInputImpl()
: capturing_(false),
shared_memory_size_(0),
callback_(NULL),
user_data_(NULL) {
}
-PPB_AudioInput_Shared::~PPB_AudioInput_Shared() {
+AudioInputImpl::~AudioInputImpl() {
// Closing the socket causes the thread to exit - wait for it.
if (socket_.get())
socket_->Close();
@@ -25,13 +25,13 @@ PPB_AudioInput_Shared::~PPB_AudioInput_Shared() {
}
}
-void PPB_AudioInput_Shared::SetCallback(PPB_AudioInput_Callback callback,
- void* user_data) {
+void AudioInputImpl::SetCallback(PPB_AudioInput_Callback callback,
+ void* user_data) {
callback_ = callback;
user_data_ = user_data;
}
-void PPB_AudioInput_Shared::SetStartCaptureState() {
+void AudioInputImpl::SetStartCaptureState() {
DCHECK(!capturing_);
DCHECK(!audio_input_thread_.get());
@@ -45,7 +45,7 @@ void PPB_AudioInput_Shared::SetStartCaptureState() {
capturing_ = true;
}
-void PPB_AudioInput_Shared::SetStopCaptureState() {
+void AudioInputImpl::SetStopCaptureState() {
DCHECK(capturing_);
if (audio_input_thread_.get()) {
@@ -55,7 +55,7 @@ void PPB_AudioInput_Shared::SetStopCaptureState() {
capturing_ = false;
}
-void PPB_AudioInput_Shared::SetStreamInfo(
+void AudioInputImpl::SetStreamInfo(
base::SharedMemoryHandle shared_memory_handle,
size_t shared_memory_size,
base::SyncSocket::Handle socket_handle) {
@@ -72,7 +72,7 @@ void PPB_AudioInput_Shared::SetStreamInfo(
}
}
-void PPB_AudioInput_Shared::StartThread() {
+void AudioInputImpl::StartThread() {
DCHECK(callback_);
DCHECK(!audio_input_thread_.get());
audio_input_thread_.reset(new base::DelegateSimpleThread(
@@ -80,7 +80,7 @@ void PPB_AudioInput_Shared::StartThread() {
audio_input_thread_->Start();
}
-void PPB_AudioInput_Shared::Run() {
+void AudioInputImpl::Run() {
int pending_data;
void* buffer = shared_memory_->memory();
diff --git a/ppapi/shared_impl/ppb_audio_input_shared.h b/ppapi/shared_impl/audio_input_impl.h
index 5c5e88d..e7604c3 100644
--- a/ppapi/shared_impl/ppb_audio_input_shared.h
+++ b/ppapi/shared_impl/audio_input_impl.h
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_AUDIO_INPUT_IMPL_H_
+#define PPAPI_SHARED_IMPL_AUDIO_INPUT_IMPL_H_
-#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/shared_memory.h"
#include "base/sync_socket.h"
@@ -19,12 +18,12 @@ namespace ppapi {
// Implements the logic to map shared memory and run the audio thread signaled
// from the sync socket. Both the proxy and the renderer implementation use
// this code.
-class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
+class PPAPI_SHARED_EXPORT AudioInputImpl
: public thunk::PPB_AudioInput_API,
public base::DelegateSimpleThread::Delegate {
public:
- PPB_AudioInput_Shared();
- virtual ~PPB_AudioInput_Shared();
+ AudioInputImpl();
+ virtual ~AudioInputImpl();
bool capturing() const { return capturing_; }
@@ -82,10 +81,8 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
// User data pointer passed verbatim to the callback function.
void* user_data_;
-
- DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Shared);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_AUDIO_INPUT_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_char_set_shared.cc b/ppapi/shared_impl/char_set_impl.cc
index 70ecd39..c18d4c7 100644
--- a/ppapi/shared_impl/ppb_char_set_shared.cc
+++ b/ppapi/shared_impl/char_set_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_char_set_shared.h"
+#include "ppapi/shared_impl/char_set_impl.h"
#include "base/i18n/icu_string_conversions.h"
#include "ppapi/c/dev/ppb_memory_dev.h"
@@ -43,12 +43,11 @@ bool PPToBaseConversionError(PP_CharSet_ConversionError on_error,
// implementation in base, so we partially duplicate the code from
// icu_string_conversions.cc with the correct error handling setup required
// by the PPAPI interface.
-char* PPB_CharSet_Shared::UTF16ToCharSet(
- const uint16_t* utf16,
- uint32_t utf16_len,
- const char* output_char_set,
- PP_CharSet_ConversionError on_error,
- uint32_t* output_length) {
+char* CharSetImpl::UTF16ToCharSet(const uint16_t* utf16,
+ uint32_t utf16_len,
+ const char* output_char_set,
+ PP_CharSet_ConversionError on_error,
+ uint32_t* output_length) {
if (!utf16 || !output_char_set || !output_length)
return NULL;
@@ -118,12 +117,11 @@ char* PPB_CharSet_Shared::UTF16ToCharSet(
}
// static
-uint16_t* PPB_CharSet_Shared::CharSetToUTF16(
- const char* input,
- uint32_t input_len,
- const char* input_char_set,
- PP_CharSet_ConversionError on_error,
- uint32_t* output_length) {
+uint16_t* CharSetImpl::CharSetToUTF16(const char* input,
+ uint32_t input_len,
+ const char* input_char_set,
+ PP_CharSet_ConversionError on_error,
+ uint32_t* output_length) {
if (!input || !input_char_set || !output_length)
return NULL;
diff --git a/ppapi/shared_impl/ppb_char_set_shared.h b/ppapi/shared_impl/char_set_impl.h
index 4243267..e6f5c10 100644
--- a/ppapi/shared_impl/ppb_char_set_shared.h
+++ b/ppapi/shared_impl/char_set_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_CHAR_SET_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_CHAR_SET_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_
+#define PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_
#include "base/basictypes.h"
#include "ppapi/c/dev/ppb_char_set_dev.h"
@@ -13,7 +13,7 @@ namespace ppapi {
// Contains the implementation of character set conversion that is shared
// between the proxy and the renderer.
-class PPAPI_SHARED_EXPORT PPB_CharSet_Shared {
+class PPAPI_SHARED_EXPORT CharSetImpl {
public:
static char* UTF16ToCharSet(const uint16_t* utf16,
uint32_t utf16_len,
@@ -30,4 +30,4 @@ class PPAPI_SHARED_EXPORT PPB_CharSet_Shared {
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_CHAR_SET_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_crypto_shared.cc b/ppapi/shared_impl/crypto_impl.cc
index 42694d0..42694d0 100644
--- a/ppapi/shared_impl/ppb_crypto_shared.cc
+++ b/ppapi/shared_impl/crypto_impl.cc
diff --git a/ppapi/shared_impl/ppb_file_ref_shared.cc b/ppapi/shared_impl/file_ref_impl.cc
index 6e748e1..274d944 100644
--- a/ppapi/shared_impl/ppb_file_ref_shared.cc
+++ b/ppapi/shared_impl/file_ref_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_file_ref_shared.h"
+#include "ppapi/shared_impl/file_ref_impl.h"
#include "base/logging.h"
#include "ppapi/shared_impl/ppapi_globals.h"
@@ -10,8 +10,7 @@
namespace ppapi {
-PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsImpl&,
- const PPB_FileRef_CreateInfo& info)
+FileRefImpl::FileRefImpl(const InitAsImpl&, const PPB_FileRef_CreateInfo& info)
: Resource(info.resource.instance()),
create_info_(info) {
// Should not have been passed a host resource for the trusted constructor.
@@ -23,24 +22,23 @@ PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsImpl&,
DCHECK(!create_info_.resource.is_null());
}
-PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsProxy&,
- const PPB_FileRef_CreateInfo& info)
+FileRefImpl::FileRefImpl(const InitAsProxy&, const PPB_FileRef_CreateInfo& info)
: Resource(info.resource),
create_info_(info) {
}
-PPB_FileRef_Shared::~PPB_FileRef_Shared() {
+FileRefImpl::~FileRefImpl() {
}
-thunk::PPB_FileRef_API* PPB_FileRef_Shared::AsPPB_FileRef_API() {
+thunk::PPB_FileRef_API* FileRefImpl::AsPPB_FileRef_API() {
return this;
}
-PP_FileSystemType PPB_FileRef_Shared::GetFileSystemType() const {
+PP_FileSystemType FileRefImpl::GetFileSystemType() const {
return static_cast<PP_FileSystemType>(create_info_.file_system_type);
}
-PP_Var PPB_FileRef_Shared::GetName() const {
+PP_Var FileRefImpl::GetName() const {
if (!name_var_.get()) {
name_var_ = new StringVar(
PpapiGlobals::Get()->GetModuleForInstance(pp_instance()),
@@ -49,7 +47,7 @@ PP_Var PPB_FileRef_Shared::GetName() const {
return name_var_->GetPPVar();
}
-PP_Var PPB_FileRef_Shared::GetPath() const {
+PP_Var FileRefImpl::GetPath() const {
if (create_info_.file_system_type == PP_FILESYSTEMTYPE_EXTERNAL)
return PP_MakeUndefined();
if (!path_var_.get()) {
@@ -60,7 +58,7 @@ PP_Var PPB_FileRef_Shared::GetPath() const {
return path_var_->GetPPVar();
}
-const PPB_FileRef_CreateInfo& PPB_FileRef_Shared::GetCreateInfo() const {
+const PPB_FileRef_CreateInfo& FileRefImpl::GetCreateInfo() const {
return create_info_;
}
diff --git a/ppapi/shared_impl/ppb_file_ref_shared.h b/ppapi/shared_impl/file_ref_impl.h
index 3d0a9f8..58ee0fe 100644
--- a/ppapi/shared_impl/ppb_file_ref_shared.h
+++ b/ppapi/shared_impl/file_ref_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_FILE_REF_IMPL_H_
+#define PPAPI_SHARED_IMPL_FILE_REF_IMPL_H_
#include <string>
@@ -29,16 +29,15 @@ struct PPB_FileRef_CreateInfo {
// This class provides the shared implementation of a FileRef. The functions
// that actually "do stuff" like Touch and MakeDirectory are implemented
// differently for the proxied and non-proxied derived classes.
-class PPAPI_SHARED_EXPORT PPB_FileRef_Shared
- : public Resource,
- public thunk::PPB_FileRef_API {
+class PPAPI_SHARED_EXPORT FileRefImpl : public Resource,
+ public thunk::PPB_FileRef_API {
public:
struct InitAsImpl {};
struct InitAsProxy {};
- PPB_FileRef_Shared(const InitAsImpl&, const PPB_FileRef_CreateInfo& info);
- PPB_FileRef_Shared(const InitAsProxy&, const PPB_FileRef_CreateInfo& info);
- virtual ~PPB_FileRef_Shared();
+ FileRefImpl(const InitAsImpl&, const PPB_FileRef_CreateInfo& info);
+ FileRefImpl(const InitAsProxy&, const PPB_FileRef_CreateInfo& info);
+ virtual ~FileRefImpl();
// Resource overrides.
virtual thunk::PPB_FileRef_API* AsPPB_FileRef_API() OVERRIDE;
@@ -58,9 +57,9 @@ class PPAPI_SHARED_EXPORT PPB_FileRef_Shared
mutable scoped_refptr<StringVar> name_var_;
mutable scoped_refptr<StringVar> path_var_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_FileRef_Shared);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(FileRefImpl);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_FILE_REF_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_font_shared.cc b/ppapi/shared_impl/font_impl.cc
index a714643..66ac5a6 100644
--- a/ppapi/shared_impl/ppb_font_shared.cc
+++ b/ppapi/shared_impl/font_impl.cc
@@ -2,15 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_font_shared.h"
+#include "ppapi/shared_impl/font_impl.h"
#include "ppapi/c/dev/ppb_font_dev.h"
namespace ppapi {
// static
-bool PPB_Font_Shared::IsPPFontDescriptionValid(
- const PP_FontDescription_Dev& desc) {
+bool FontImpl::IsPPFontDescriptionValid(const PP_FontDescription_Dev& desc) {
// Check validity of string. We can't check the actual text since we could
// be on the wrong thread and don't know if we're in the plugin or the host.
if (desc.face.type != PP_VARTYPE_STRING &&
diff --git a/ppapi/shared_impl/ppb_font_shared.h b/ppapi/shared_impl/font_impl.h
index af0f681..a8ab2df 100644
--- a/ppapi/shared_impl/ppb_font_shared.h
+++ b/ppapi/shared_impl/font_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_FONT_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_FONT_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_FONT_IMPL_H_
+#define PPAPI_SHARED_IMPL_FONT_IMPL_H_
#pragma once
#include <string>
@@ -18,15 +18,15 @@ struct PP_FontDescription_Dev;
namespace ppapi {
-class PPAPI_SHARED_EXPORT PPB_Font_Shared {
+class PPAPI_SHARED_EXPORT FontImpl {
public:
// Validates the parameters in thee description. Can be called on any thread.
static bool IsPPFontDescriptionValid(const PP_FontDescription_Dev& desc);
private:
- DISALLOW_COPY_AND_ASSIGN(PPB_Font_Shared);
+ DISALLOW_COPY_AND_ASSIGN(FontImpl);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_FONT_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_FONT_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.cc b/ppapi/shared_impl/graphics_3d_impl.cc
index 9e0c155..00555de 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.cc
+++ b/ppapi/shared_impl/graphics_3d_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
+#include "ppapi/shared_impl/graphics_3d_impl.h"
#include "base/logging.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h"
@@ -11,34 +11,34 @@
namespace ppapi {
-PPB_Graphics3D_Shared::PPB_Graphics3D_Shared()
+Graphics3DImpl::Graphics3DImpl()
: transfer_buffer_id_(-1),
swap_callback_(PP_BlockUntilComplete()) {
}
-PPB_Graphics3D_Shared::~PPB_Graphics3D_Shared() {
+Graphics3DImpl::~Graphics3DImpl() {
// Make sure that GLES2 implementation has already been destroyed.
DCHECK_EQ(transfer_buffer_id_, -1);
DCHECK(!gles2_helper_.get());
DCHECK(!gles2_impl_.get());
}
-int32_t PPB_Graphics3D_Shared::GetAttribs(int32_t* attrib_list) {
+int32_t Graphics3DImpl::GetAttribs(int32_t* attrib_list) {
// TODO(alokp): Implement me.
return PP_ERROR_FAILED;
}
-int32_t PPB_Graphics3D_Shared::SetAttribs(int32_t* attrib_list) {
+int32_t Graphics3DImpl::SetAttribs(int32_t* attrib_list) {
// TODO(alokp): Implement me.
return PP_ERROR_FAILED;
}
-int32_t PPB_Graphics3D_Shared::GetError() {
+int32_t Graphics3DImpl::GetError() {
// TODO(alokp): Implement me.
return PP_ERROR_FAILED;
}
-int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) {
+int32_t Graphics3DImpl::ResizeBuffers(int32_t width, int32_t height) {
if ((width < 0) || (height < 0))
return PP_ERROR_BADARGUMENT;
@@ -47,7 +47,7 @@ int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) {
return PP_OK;
}
-int32_t PPB_Graphics3D_Shared::SwapBuffers(PP_CompletionCallback callback) {
+int32_t Graphics3DImpl::SwapBuffers(PP_CompletionCallback callback) {
if (!callback.func) {
// Blocking SwapBuffers isn't supported (since we have to be on the main
// thread).
@@ -63,30 +63,30 @@ int32_t PPB_Graphics3D_Shared::SwapBuffers(PP_CompletionCallback callback) {
return DoSwapBuffers();
}
-void* PPB_Graphics3D_Shared::MapTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- GLenum access) {
+void* Graphics3DImpl::MapTexSubImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ GLenum access) {
return gles2_impl_->MapTexSubImage2DCHROMIUM(
target, level, xoffset, yoffset, width, height, format, type, access);
}
-void PPB_Graphics3D_Shared::UnmapTexSubImage2DCHROMIUM(const void* mem) {
+void Graphics3DImpl::UnmapTexSubImage2DCHROMIUM(const void* mem) {
gles2_impl_->UnmapTexSubImage2DCHROMIUM(mem);
}
-void PPB_Graphics3D_Shared::SwapBuffersACK(int32_t pp_error) {
+void Graphics3DImpl::SwapBuffersACK(int32_t pp_error) {
DCHECK(HasPendingSwap());
PP_RunAndClearCompletionCallback(&swap_callback_, pp_error);
}
-bool PPB_Graphics3D_Shared::CreateGLES2Impl(int32 command_buffer_size,
- int32 transfer_buffer_size) {
+bool Graphics3DImpl::CreateGLES2Impl(int32 command_buffer_size,
+ int32 transfer_buffer_size) {
gpu::CommandBuffer* command_buffer = GetCommandBuffer();
DCHECK(command_buffer);
@@ -120,7 +120,7 @@ bool PPB_Graphics3D_Shared::CreateGLES2Impl(int32 command_buffer_size,
return true;
}
-void PPB_Graphics3D_Shared::DestroyGLES2Impl() {
+void Graphics3DImpl::DestroyGLES2Impl() {
gles2_impl_.reset();
if (transfer_buffer_id_ != -1) {
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.h b/ppapi/shared_impl/graphics_3d_impl.h
index 6f3a04f..07fe967 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.h
+++ b/ppapi/shared_impl/graphics_3d_impl.h
@@ -21,8 +21,7 @@ class GLES2Implementation;
namespace ppapi {
-class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
- : public thunk::PPB_Graphics3D_API {
+class PPAPI_SHARED_EXPORT Graphics3DImpl : public thunk::PPB_Graphics3D_API {
public:
// PPB_Graphics3D_API implementation.
virtual int32_t GetAttribs(int32_t* attrib_list) OVERRIDE;
@@ -49,8 +48,8 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
void SwapBuffersACK(int32_t pp_error);
protected:
- PPB_Graphics3D_Shared();
- virtual ~PPB_Graphics3D_Shared();
+ Graphics3DImpl();
+ virtual ~Graphics3DImpl();
virtual gpu::CommandBuffer* GetCommandBuffer() = 0;
virtual int32 DoSwapBuffers() = 0;
@@ -68,7 +67,7 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
// Callback that needs to be executed when swap-buffers is completed.
PP_CompletionCallback swap_callback_;
- DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared);
+ DISALLOW_COPY_AND_ASSIGN(Graphics3DImpl);
};
} // namespace ppapi
diff --git a/ppapi/shared_impl/ppb_image_data_shared.cc b/ppapi/shared_impl/image_data_impl.cc
index b0935e4..e07d2cb 100644
--- a/ppapi/shared_impl/ppb_image_data_shared.cc
+++ b/ppapi/shared_impl/image_data_impl.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_image_data_shared.h"
+#include "ppapi/shared_impl/image_data_impl.h"
#include "third_party/skia/include/core/SkTypes.h"
namespace ppapi {
// static
-PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
+PP_ImageDataFormat ImageDataImpl::GetNativeImageDataFormat() {
if (SK_B32_SHIFT == 0)
return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
else if (SK_R32_SHIFT == 0)
@@ -19,8 +19,7 @@ PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
}
// static
-bool PPB_ImageData_Shared::IsImageDataFormatSupported(
- PP_ImageDataFormat format) {
+bool ImageDataImpl::IsImageDataFormatSupported(PP_ImageDataFormat format) {
return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL ||
format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
}
diff --git a/ppapi/shared_impl/ppb_image_data_shared.h b/ppapi/shared_impl/image_data_impl.h
index 4f9a4d5..f931c78 100644
--- a/ppapi/shared_impl/ppb_image_data_shared.h
+++ b/ppapi/shared_impl/image_data_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_IMAGE_DATA_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_IMAGE_DATA_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_
+#define PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/ppb_image_data.h"
@@ -20,7 +20,7 @@ namespace ppapi {
// probably best to have some kind of "configuration" message that the renderer
// sends to the plugin process on startup that contains all of these kind of
// settings.
-class PPAPI_SHARED_EXPORT PPB_ImageData_Shared {
+class PPAPI_SHARED_EXPORT ImageDataImpl {
public:
static PP_ImageDataFormat GetNativeImageDataFormat();
static bool IsImageDataFormatSupported(PP_ImageDataFormat format);
@@ -28,4 +28,4 @@ class PPAPI_SHARED_EXPORT PPB_ImageData_Shared {
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_IMAGE_DATA_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_input_event_shared.cc b/ppapi/shared_impl/input_event_impl.cc
index 962f701..d502a62 100644
--- a/ppapi/shared_impl/ppb_input_event_shared.cc
+++ b/ppapi/shared_impl/input_event_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_input_event_shared.h"
+#include "ppapi/shared_impl/input_event_impl.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/var.h"
@@ -33,95 +33,95 @@ InputEventData::InputEventData()
InputEventData::~InputEventData() {
}
-PPB_InputEvent_Shared::PPB_InputEvent_Shared(const InitAsImpl&,
- PP_Instance instance,
- const InputEventData& data)
+InputEventImpl::InputEventImpl(const InitAsImpl&,
+ PP_Instance instance,
+ const InputEventData& data)
: Resource(instance),
data_(data) {
}
-PPB_InputEvent_Shared::PPB_InputEvent_Shared(const InitAsProxy&,
- PP_Instance instance,
- const InputEventData& data)
+InputEventImpl::InputEventImpl(const InitAsProxy&,
+ PP_Instance instance,
+ const InputEventData& data)
: Resource(HostResource::MakeInstanceOnly(instance)),
data_(data) {
}
-PPB_InputEvent_API* PPB_InputEvent_Shared::AsPPB_InputEvent_API() {
+PPB_InputEvent_API* InputEventImpl::AsPPB_InputEvent_API() {
return this;
}
-const InputEventData& PPB_InputEvent_Shared::GetInputEventData() const {
+const InputEventData& InputEventImpl::GetInputEventData() const {
return data_;
}
-PP_InputEvent_Type PPB_InputEvent_Shared::GetType() {
+PP_InputEvent_Type InputEventImpl::GetType() {
return data_.event_type;
}
-PP_TimeTicks PPB_InputEvent_Shared::GetTimeStamp() {
+PP_TimeTicks InputEventImpl::GetTimeStamp() {
return data_.event_time_stamp;
}
-uint32_t PPB_InputEvent_Shared::GetModifiers() {
+uint32_t InputEventImpl::GetModifiers() {
return data_.event_modifiers;
}
-PP_InputEvent_MouseButton PPB_InputEvent_Shared::GetMouseButton() {
+PP_InputEvent_MouseButton InputEventImpl::GetMouseButton() {
return data_.mouse_button;
}
-PP_Point PPB_InputEvent_Shared::GetMousePosition() {
+PP_Point InputEventImpl::GetMousePosition() {
return data_.mouse_position;
}
-int32_t PPB_InputEvent_Shared::GetMouseClickCount() {
+int32_t InputEventImpl::GetMouseClickCount() {
return data_.mouse_click_count;
}
-PP_Point PPB_InputEvent_Shared::GetMouseMovement() {
+PP_Point InputEventImpl::GetMouseMovement() {
return data_.mouse_movement;
}
-PP_FloatPoint PPB_InputEvent_Shared::GetWheelDelta() {
+PP_FloatPoint InputEventImpl::GetWheelDelta() {
return data_.wheel_delta;
}
-PP_FloatPoint PPB_InputEvent_Shared::GetWheelTicks() {
+PP_FloatPoint InputEventImpl::GetWheelTicks() {
return data_.wheel_ticks;
}
-PP_Bool PPB_InputEvent_Shared::GetWheelScrollByPage() {
+PP_Bool InputEventImpl::GetWheelScrollByPage() {
return PP_FromBool(data_.wheel_scroll_by_page);
}
-uint32_t PPB_InputEvent_Shared::GetKeyCode() {
+uint32_t InputEventImpl::GetKeyCode() {
return data_.key_code;
}
-PP_Var PPB_InputEvent_Shared::GetCharacterText() {
+PP_Var InputEventImpl::GetCharacterText() {
return StringVar::StringToPPVar(
PpapiGlobals::Get()->GetModuleForInstance(pp_instance()),
data_.character_text);
}
-uint32_t PPB_InputEvent_Shared::GetIMESegmentNumber() {
+uint32_t InputEventImpl::GetIMESegmentNumber() {
if (data_.composition_segment_offsets.empty())
return 0;
return data_.composition_segment_offsets.size() - 1;
}
-uint32_t PPB_InputEvent_Shared::GetIMESegmentOffset(uint32_t index) {
+uint32_t InputEventImpl::GetIMESegmentOffset(uint32_t index) {
if (index >= data_.composition_segment_offsets.size())
return 0;
return data_.composition_segment_offsets[index];
}
-int32_t PPB_InputEvent_Shared::GetIMETargetSegment() {
+int32_t InputEventImpl::GetIMETargetSegment() {
return data_.composition_target_segment;
}
-void PPB_InputEvent_Shared::GetIMESelection(uint32_t* start, uint32_t* end) {
+void InputEventImpl::GetIMESelection(uint32_t* start, uint32_t* end) {
if (start)
*start = data_.composition_selection_start;
if (end)
diff --git a/ppapi/shared_impl/ppb_input_event_shared.h b/ppapi/shared_impl/input_event_impl.h
index 1a29750..094eb8c 100644
--- a/ppapi/shared_impl/ppb_input_event_shared.h
+++ b/ppapi/shared_impl/input_event_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_
+#define PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_
#include <string>
#include <vector>
@@ -51,7 +51,7 @@ struct PPAPI_SHARED_EXPORT InputEventData {
// This simple class implements the PPB_InputEvent_API in terms of the
// shared InputEventData structure
-class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared
+class PPAPI_SHARED_EXPORT InputEventImpl
: public Resource,
public thunk::PPB_InputEvent_API {
public:
@@ -60,12 +60,12 @@ class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared
// The dummy arguments control which version of Resource's constructor is
// called for this base class.
- PPB_InputEvent_Shared(const InitAsImpl&,
- PP_Instance instance,
- const InputEventData& data);
- PPB_InputEvent_Shared(const InitAsProxy&,
- PP_Instance instance,
- const InputEventData& data);
+ InputEventImpl(const InitAsImpl&,
+ PP_Instance instance,
+ const InputEventData& data);
+ InputEventImpl(const InitAsProxy&,
+ PP_Instance instance,
+ const InputEventData& data);
// Resource overrides.
virtual PPB_InputEvent_API* AsPPB_InputEvent_API() OVERRIDE;
@@ -92,9 +92,9 @@ class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared
private:
InputEventData data_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(InputEventImpl);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_instance_shared.cc b/ppapi/shared_impl/instance_impl.cc
index a2416ce..ad1674a 100644
--- a/ppapi/shared_impl/ppb_instance_shared.cc
+++ b/ppapi/shared_impl/instance_impl.cc
@@ -2,19 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_instance_shared.h"
+#include "ppapi/shared_impl/instance_impl.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_input_event.h"
namespace ppapi {
-PPB_Instance_Shared::~PPB_Instance_Shared() {
+InstanceImpl::~InstanceImpl() {
}
-int32_t PPB_Instance_Shared::ValidateRequestInputEvents(
- bool is_filtering,
- uint32_t event_classes) {
+int32_t InstanceImpl::ValidateRequestInputEvents(bool is_filtering,
+ uint32_t event_classes) {
// See if any bits are set we don't know about.
if (event_classes &
~static_cast<uint32_t>(PP_INPUTEVENT_CLASS_MOUSE |
diff --git a/ppapi/shared_impl/ppb_instance_shared.h b/ppapi/shared_impl/instance_impl.h
index 353a822..fdc741f 100644
--- a/ppapi/shared_impl/ppb_instance_shared.h
+++ b/ppapi/shared_impl/instance_impl.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_
+#define PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_
#include "ppapi/c/pp_stdint.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
namespace ppapi {
-class PPAPI_SHARED_EXPORT PPB_Instance_Shared {
+class PPAPI_SHARED_EXPORT InstanceImpl {
public:
- virtual ~PPB_Instance_Shared();
+ virtual ~InstanceImpl();
// Error checks the given resquest to Request[Filtering]InputEvents. Returns
// PP_OK if the given classes are all valid, PP_ERROR_NOTSUPPORTED if not.
@@ -21,4 +21,4 @@ class PPAPI_SHARED_EXPORT PPB_Instance_Shared {
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_memory_shared.cc b/ppapi/shared_impl/memory_impl.cc
index 2cf8aa7..2cf8aa7 100644
--- a/ppapi/shared_impl/ppb_memory_shared.cc
+++ b/ppapi/shared_impl/memory_impl.cc
diff --git a/ppapi/shared_impl/ppb_opengles2_shared.cc b/ppapi/shared_impl/opengles2_impl.cc
index 635ea41..2743d2e 100644
--- a/ppapi/shared_impl/ppb_opengles2_shared.cc
+++ b/ppapi/shared_impl/opengles2_impl.cc
@@ -6,11 +6,11 @@
// gpu/command_buffer/build_gles2_cmd_buffer.py
// DO NOT EDIT!
-#include "ppapi/shared_impl/ppb_opengles2_shared.h"
+#include "ppapi/shared_impl/opengles2_impl.h"
#include "base/logging.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
-#include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
+#include "ppapi/shared_impl/graphics_3d_impl.h"
#include "ppapi/thunk/enter.h"
namespace ppapi {
@@ -20,7 +20,7 @@ namespace {
gpu::gles2::GLES2Implementation* GetGLES(PP_Resource context) {
thunk::EnterResource<thunk::PPB_Graphics3D_API> enter_g3d(context, false);
DCHECK(enter_g3d.succeeded());
- return static_cast<PPB_Graphics3D_Shared*>(enter_g3d.object())->gles2_impl();
+ return static_cast<Graphics3DImpl*>(enter_g3d.object())->gles2_impl();
}
void ActiveTexture(PP_Resource context_id, GLenum texture) {
@@ -891,7 +891,7 @@ const struct PPB_OpenGLES2 ppb_opengles2 = {
} // namespace
-const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() {
+const PPB_OpenGLES2* OpenGLES2Impl::GetInterface() {
return &ppb_opengles2;
}
diff --git a/ppapi/shared_impl/ppb_opengles2_shared.h b/ppapi/shared_impl/opengles2_impl.h
index 2b4c9f9..4ed6e90 100644
--- a/ppapi/shared_impl/ppb_opengles2_shared.h
+++ b/ppapi/shared_impl/opengles2_impl.h
@@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_OPENGLES2_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_OPENGLES2_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_
+#define PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_
#include "ppapi/c/ppb_opengles2.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
namespace ppapi {
-class PPAPI_SHARED_EXPORT PPB_OpenGLES2_Shared {
+class PPAPI_SHARED_EXPORT OpenGLES2Impl {
public:
static const PPB_OpenGLES2* GetInterface();
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_OPENGLES2_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_url_request_info_shared.cc b/ppapi/shared_impl/url_request_info_impl.cc
index f582eac..5802102 100644
--- a/ppapi/shared_impl/ppb_url_request_info_shared.cc
+++ b/ppapi/shared_impl/url_request_info_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_url_request_info_shared.h"
+#include "ppapi/shared_impl/url_request_info_impl.h"
#include "base/string_util.h"
#include "ppapi/shared_impl/var.h"
@@ -70,30 +70,27 @@ PPB_URLRequestInfo_Data::PPB_URLRequestInfo_Data()
PPB_URLRequestInfo_Data::~PPB_URLRequestInfo_Data() {
}
-PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared(
- PP_Instance instance,
- const PPB_URLRequestInfo_Data& data)
+URLRequestInfoImpl::URLRequestInfoImpl(PP_Instance instance,
+ const PPB_URLRequestInfo_Data& data)
: Resource(instance),
data_(data) {
}
-PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared(
- const HostResource& host_resource,
- const PPB_URLRequestInfo_Data& data)
+URLRequestInfoImpl::URLRequestInfoImpl(const HostResource& host_resource,
+ const PPB_URLRequestInfo_Data& data)
: Resource(host_resource),
data_(data) {
}
-PPB_URLRequestInfo_Shared::~PPB_URLRequestInfo_Shared() {
+URLRequestInfoImpl::~URLRequestInfoImpl() {
}
-thunk::PPB_URLRequestInfo_API*
-PPB_URLRequestInfo_Shared::AsPPB_URLRequestInfo_API() {
+thunk::PPB_URLRequestInfo_API* URLRequestInfoImpl::AsPPB_URLRequestInfo_API() {
return this;
}
-PP_Bool PPB_URLRequestInfo_Shared::SetProperty(PP_URLRequestProperty property,
- PP_Var var) {
+PP_Bool URLRequestInfoImpl::SetProperty(PP_URLRequestProperty property,
+ PP_Var var) {
// IMPORTANT: Do not do security validation of parameters at this level
// without also adding them to PPB_URLRequestInfo_Impl::ValidateData. This
// code is used both in the plugin (which we don't trust) and in the renderer
@@ -135,8 +132,7 @@ PP_Bool PPB_URLRequestInfo_Shared::SetProperty(PP_URLRequestProperty property,
return result;
}
-PP_Bool PPB_URLRequestInfo_Shared::AppendDataToBody(const void* data,
- uint32_t len) {
+PP_Bool URLRequestInfoImpl::AppendDataToBody(const void* data, uint32_t len) {
if (len > 0) {
data_.body.push_back(PPB_URLRequestInfo_Data::BodyItem(
std::string(static_cast<const char*>(data), len)));
@@ -144,7 +140,7 @@ PP_Bool PPB_URLRequestInfo_Shared::AppendDataToBody(const void* data,
return PP_TRUE;
}
-PP_Bool PPB_URLRequestInfo_Shared::AppendFileToBody(
+PP_Bool URLRequestInfoImpl::AppendFileToBody(
PP_Resource file_ref,
int64_t start_offset,
int64_t number_of_bytes,
@@ -169,12 +165,11 @@ PP_Bool PPB_URLRequestInfo_Shared::AppendFileToBody(
return PP_TRUE;
}
-const PPB_URLRequestInfo_Data& PPB_URLRequestInfo_Shared::GetData() const {
+const PPB_URLRequestInfo_Data& URLRequestInfoImpl::GetData() const {
return data_;
}
-bool PPB_URLRequestInfo_Shared::SetUndefinedProperty(
- PP_URLRequestProperty property) {
+bool URLRequestInfoImpl::SetUndefinedProperty(PP_URLRequestProperty property) {
// IMPORTANT: Do not do security validation of parameters at this level
// without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See
// SetProperty() above for why.
@@ -192,9 +187,8 @@ bool PPB_URLRequestInfo_Shared::SetUndefinedProperty(
}
}
-bool PPB_URLRequestInfo_Shared::SetBooleanProperty(
- PP_URLRequestProperty property,
- bool value) {
+bool URLRequestInfoImpl::SetBooleanProperty(PP_URLRequestProperty property,
+ bool value) {
// IMPORTANT: Do not do security validation of parameters at this level
// without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See
// SetProperty() above for why.
@@ -222,9 +216,8 @@ bool PPB_URLRequestInfo_Shared::SetBooleanProperty(
}
}
-bool PPB_URLRequestInfo_Shared::SetIntegerProperty(
- PP_URLRequestProperty property,
- int32_t value) {
+bool URLRequestInfoImpl::SetIntegerProperty(PP_URLRequestProperty property,
+ int32_t value) {
// IMPORTANT: Do not do security validation of parameters at this level
// without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See
// SetProperty() above for why.
@@ -240,9 +233,8 @@ bool PPB_URLRequestInfo_Shared::SetIntegerProperty(
}
}
-bool PPB_URLRequestInfo_Shared::SetStringProperty(
- PP_URLRequestProperty property,
- const std::string& value) {
+bool URLRequestInfoImpl::SetStringProperty(PP_URLRequestProperty property,
+ const std::string& value) {
// IMPORTANT: Do not do security validation of parameters at this level
// without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See
// SetProperty() above for why.
diff --git a/ppapi/shared_impl/ppb_url_request_info_shared.h b/ppapi/shared_impl/url_request_info_impl.h
index c07b9c9..67e2e49 100644
--- a/ppapi/shared_impl/ppb_url_request_info_shared.h
+++ b/ppapi/shared_impl/url_request_info_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_
+#define PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_
#include <string>
#include <vector>
@@ -86,16 +86,16 @@ struct PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Data {
// ppapi_messages.h
};
-class PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Shared
+class PPAPI_SHARED_EXPORT URLRequestInfoImpl
: public ::ppapi::Resource,
public ::ppapi::thunk::PPB_URLRequestInfo_API {
public:
// This constructor initializes the object as a proxy object with the given
// host resource.
- PPB_URLRequestInfo_Shared(const HostResource& host_resource,
+ URLRequestInfoImpl(const HostResource& host_resource,
const PPB_URLRequestInfo_Data& data);
- ~PPB_URLRequestInfo_Shared();
+ ~URLRequestInfoImpl();
// Resource overrides.
virtual thunk::PPB_URLRequestInfo_API* AsPPB_URLRequestInfo_API() OVERRIDE;
@@ -113,7 +113,7 @@ class PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Shared
protected:
// Constructor used by the webkit implementation.
- PPB_URLRequestInfo_Shared(PP_Instance instance,
+ URLRequestInfoImpl(PP_Instance instance,
const PPB_URLRequestInfo_Data& data);
bool SetUndefinedProperty(PP_URLRequestProperty property);
@@ -128,9 +128,9 @@ class PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Shared
private:
PPB_URLRequestInfo_Data data_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_URLRequestInfo_Shared);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(URLRequestInfoImpl);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_
diff --git a/ppapi/shared_impl/ppb_url_util_shared.cc b/ppapi/shared_impl/url_util_impl.cc
index bdc4950..fdccdb6 100644
--- a/ppapi/shared_impl/ppb_url_util_shared.cc
+++ b/ppapi/shared_impl/url_util_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_url_util_shared.h"
+#include "ppapi/shared_impl/url_util_impl.h"
#include "googleurl/src/gurl.h"
#include "ppapi/shared_impl/ppapi_globals.h"
@@ -43,8 +43,8 @@ void ConvertComponents(const url_parse::Parsed& input,
} // namespace
// static
-PP_Var PPB_URLUtil_Shared::Canonicalize(PP_Var url,
- PP_URLComponents_Dev* components) {
+PP_Var URLUtilImpl::Canonicalize(PP_Var url,
+ PP_URLComponents_Dev* components) {
StringVar* url_string = StringVar::FromPPVar(url);
if (!url_string)
return PP_MakeNull();
@@ -53,10 +53,9 @@ PP_Var PPB_URLUtil_Shared::Canonicalize(PP_Var url,
}
// static
-PP_Var PPB_URLUtil_Shared::ResolveRelativeToURL(
- PP_Var base_url,
- PP_Var relative,
- PP_URLComponents_Dev* components) {
+PP_Var URLUtilImpl::ResolveRelativeToURL(PP_Var base_url,
+ PP_Var relative,
+ PP_URLComponents_Dev* components) {
StringVar* base_url_string = StringVar::FromPPVar(base_url);
StringVar* relative_string = StringVar::FromPPVar(relative);
if (!base_url_string || !relative_string)
@@ -71,7 +70,7 @@ PP_Var PPB_URLUtil_Shared::ResolveRelativeToURL(
}
// static
-PP_Bool PPB_URLUtil_Shared::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) {
+PP_Bool URLUtilImpl::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) {
StringVar* url_a_string = StringVar::FromPPVar(url_a);
StringVar* url_b_string = StringVar::FromPPVar(url_b);
if (!url_a_string || !url_b_string)
@@ -87,17 +86,16 @@ PP_Bool PPB_URLUtil_Shared::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) {
// Used for returning the given GURL from a PPAPI function, with an optional
// out param indicating the components.
-PP_Var PPB_URLUtil_Shared::GenerateURLReturn(
- PP_Module module,
- const GURL& url,
- PP_URLComponents_Dev* components) {
+PP_Var URLUtilImpl::GenerateURLReturn(PP_Module module,
+ const GURL& url,
+ PP_URLComponents_Dev* components) {
if (!url.is_valid())
return PP_MakeNull();
ConvertComponents(url.parsed_for_possibly_invalid_spec(), components);
return StringVar::StringToPPVar(module, url.possibly_invalid_spec());
}
-PP_Var PPB_URLUtil_Shared::ConvertComponentsAndReturnURL(
+PP_Var URLUtilImpl::ConvertComponentsAndReturnURL(
const PP_Var& url,
PP_URLComponents_Dev* components) {
if (!components)
diff --git a/ppapi/shared_impl/ppb_url_util_shared.h b/ppapi/shared_impl/url_util_impl.h
index 54c7573..b7fae83 100644
--- a/ppapi/shared_impl/ppb_url_util_shared.h
+++ b/ppapi/shared_impl/url_util_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_URL_UTIL_IMPL_H_
+#define PPAPI_SHARED_IMPL_URL_UTIL_IMPL_H_
#include <string>
@@ -20,7 +20,7 @@ namespace ppapi {
// Contains the implementation of PPB_URLUtil that is shared between the proxy
// and the renderer.
-class PPAPI_SHARED_EXPORT PPB_URLUtil_Shared {
+class PPAPI_SHARED_EXPORT URLUtilImpl {
public:
// PPB_URLUtil shared functions.
static PP_Var Canonicalize(PP_Var url,
@@ -50,4 +50,4 @@ class PPAPI_SHARED_EXPORT PPB_URLUtil_Shared {
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
+#endif
diff --git a/ppapi/shared_impl/ppb_video_decoder_shared.cc b/ppapi/shared_impl/video_decoder_impl.cc
index 190654e..1ab0a39 100644
--- a/ppapi/shared_impl/ppb_video_decoder_shared.cc
+++ b/ppapi/shared_impl/video_decoder_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/shared_impl/ppb_video_decoder_shared.h"
+#include "ppapi/shared_impl/video_decoder_impl.h"
#include "base/logging.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
@@ -12,17 +12,17 @@
namespace ppapi {
-PPB_VideoDecoder_Shared::PPB_VideoDecoder_Shared()
+VideoDecoderImpl::VideoDecoderImpl()
: flush_callback_(PP_MakeCompletionCallback(NULL, NULL)),
reset_callback_(PP_MakeCompletionCallback(NULL, NULL)),
graphics_context_(0),
gles2_impl_(NULL) {
}
-PPB_VideoDecoder_Shared::~PPB_VideoDecoder_Shared() {
+VideoDecoderImpl::~VideoDecoderImpl() {
}
-void PPB_VideoDecoder_Shared::InitCommon(
+void VideoDecoderImpl::InitCommon(
PP_Resource graphics_context,
gpu::gles2::GLES2Implementation* gles2_impl) {
DCHECK(graphics_context);
@@ -32,13 +32,13 @@ void PPB_VideoDecoder_Shared::InitCommon(
graphics_context_ = graphics_context;
}
-void PPB_VideoDecoder_Shared::Destroy() {
+void VideoDecoderImpl::Destroy() {
graphics_context_ = 0;
gles2_impl_ = NULL;
PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(graphics_context_);
}
-bool PPB_VideoDecoder_Shared::SetFlushCallback(PP_CompletionCallback callback) {
+bool VideoDecoderImpl::SetFlushCallback(PP_CompletionCallback callback) {
CHECK(callback.func);
if (flush_callback_.func)
return false;
@@ -46,7 +46,7 @@ bool PPB_VideoDecoder_Shared::SetFlushCallback(PP_CompletionCallback callback) {
return true;
}
-bool PPB_VideoDecoder_Shared::SetResetCallback(PP_CompletionCallback callback) {
+bool VideoDecoderImpl::SetResetCallback(PP_CompletionCallback callback) {
CHECK(callback.func);
if (reset_callback_.func)
return false;
@@ -54,23 +54,23 @@ bool PPB_VideoDecoder_Shared::SetResetCallback(PP_CompletionCallback callback) {
return true;
}
-bool PPB_VideoDecoder_Shared::SetBitstreamBufferCallback(
+bool VideoDecoderImpl::SetBitstreamBufferCallback(
int32 bitstream_buffer_id, PP_CompletionCallback callback) {
return bitstream_buffer_callbacks_.insert(
std::make_pair(bitstream_buffer_id, callback)).second;
}
-void PPB_VideoDecoder_Shared::RunFlushCallback(int32 result) {
+void VideoDecoderImpl::RunFlushCallback(int32 result) {
DCHECK(flush_callback_.func);
PP_RunAndClearCompletionCallback(&flush_callback_, result);
}
-void PPB_VideoDecoder_Shared::RunResetCallback(int32 result) {
+void VideoDecoderImpl::RunResetCallback(int32 result) {
DCHECK(reset_callback_.func);
PP_RunAndClearCompletionCallback(&reset_callback_, result);
}
-void PPB_VideoDecoder_Shared::RunBitstreamBufferCallback(
+void VideoDecoderImpl::RunBitstreamBufferCallback(
int32 bitstream_buffer_id, int32 result) {
CallbackById::iterator it =
bitstream_buffer_callbacks_.find(bitstream_buffer_id);
@@ -80,7 +80,7 @@ void PPB_VideoDecoder_Shared::RunBitstreamBufferCallback(
PP_RunCompletionCallback(&cc, PP_OK);
}
-void PPB_VideoDecoder_Shared::FlushCommandBuffer() {
+void VideoDecoderImpl::FlushCommandBuffer() {
if (gles2_impl_)
gles2_impl_->Flush();
}
diff --git a/ppapi/shared_impl/ppb_video_decoder_shared.h b/ppapi/shared_impl/video_decoder_impl.h
index 55b629c..754dd75 100644
--- a/ppapi/shared_impl/ppb_video_decoder_shared.h
+++ b/ppapi/shared_impl/video_decoder_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_
+#ifndef PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_
+#define PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_
#include <map>
#include <vector>
@@ -24,11 +24,11 @@ namespace ppapi {
// Implements the logic to set and run callbacks for various video decoder
// events. Both the proxy and the renderer implementation share this code.
-class PPAPI_SHARED_EXPORT PPB_VideoDecoder_Shared
+class PPAPI_SHARED_EXPORT VideoDecoderImpl
: NON_EXPORTED_BASE(public thunk::PPB_VideoDecoder_API) {
public:
- PPB_VideoDecoder_Shared();
- virtual ~PPB_VideoDecoder_Shared();
+ VideoDecoderImpl();
+ virtual ~VideoDecoderImpl();
// PPB_VideoDecoder_API implementation.
virtual void Destroy() OVERRIDE;
@@ -69,9 +69,9 @@ class PPAPI_SHARED_EXPORT PPB_VideoDecoder_Shared
// process only, so gles2_impl_ is NULL in that case.
gpu::gles2::GLES2Implementation* gles2_impl_;
- DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Shared);
+ DISALLOW_COPY_AND_ASSIGN(VideoDecoderImpl);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_
+#endif // PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_