diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-16 18:15:52 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-16 18:15:52 +0000 |
commit | 0bd753681a82634f322d4867b19148474c25566b (patch) | |
tree | 2f96cb4494c075ddee5a3e42e6b41c096a5357a9 /chrome/renderer | |
parent | d1d0afe664ff43825a4585f88ee8ce412eab0194 (diff) | |
download | chromium_src-0bd753681a82634f322d4867b19148474c25566b.zip chromium_src-0bd753681a82634f322d4867b19148474c25566b.tar.gz chromium_src-0bd753681a82634f322d4867b19148474c25566b.tar.bz2 |
Move the Pepper implementation from webkit/glue/plugins/pepper_* to
webkit/plugins/ppapi/*. This renamed the files and interface implementation
classes from foo.cc/Foo to ppb_foo_impl/PPB_Foo_Impl to match the proxy
ppb_foo_proxy/PPB_Foo_Proxy.
This moves plugin_switches.* from webkit/glue/plugins to webkit/plugins.
Review URL: http://codereview.chromium.org/5828003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/DEPS | 1 | ||||
-rw-r--r-- | chrome/renderer/pepper_platform_context_3d_impl.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/pepper_platform_context_3d_impl.h | 5 | ||||
-rw-r--r-- | chrome/renderer/pepper_plugin_delegate_impl.cc | 71 | ||||
-rw-r--r-- | chrome/renderer/pepper_plugin_delegate_impl.h | 37 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 22 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 21 | ||||
-rw-r--r-- | chrome/renderer/render_widget_fullscreen_pepper.cc | 16 | ||||
-rw-r--r-- | chrome/renderer/render_widget_fullscreen_pepper.h | 20 |
9 files changed, 112 insertions, 83 deletions
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS index 9b488d4..dfd8d21 100644 --- a/chrome/renderer/DEPS +++ b/chrome/renderer/DEPS @@ -14,6 +14,7 @@ include_rules = [ "+webkit/extensions", "+webkit/glue", "+webkit/glue/plugins", + "+webkit/plugins", "+v8/include", "+third_party/cld/encodings/compact_lang_det/win", "+third_party/npapi/bindings", diff --git a/chrome/renderer/pepper_platform_context_3d_impl.cc b/chrome/renderer/pepper_platform_context_3d_impl.cc index 1d86a67..e1e5dc5 100644 --- a/chrome/renderer/pepper_platform_context_3d_impl.cc +++ b/chrome/renderer/pepper_platform_context_3d_impl.cc @@ -10,7 +10,7 @@ #ifdef ENABLE_GPU PlatformContext3DImpl::PlatformContext3DImpl(ggl::Context* parent_context) - : parent_context_(parent_context), + : parent_context_(parent_context), context_(NULL) { } diff --git a/chrome/renderer/pepper_platform_context_3d_impl.h b/chrome/renderer/pepper_platform_context_3d_impl.h index 03c6bb6..6d049c0 100644 --- a/chrome/renderer/pepper_platform_context_3d_impl.h +++ b/chrome/renderer/pepper_platform_context_3d_impl.h @@ -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 "webkit/glue/plugins/pepper_plugin_delegate.h" +#include "webkit/plugins/ppapi/plugin_delegate.h" #ifdef ENABLE_GPU @@ -12,7 +12,8 @@ class Context; } // namespace ggl; -class PlatformContext3DImpl : public pepper::PluginDelegate::PlatformContext3D { +class PlatformContext3DImpl + : public webkit::ppapi::PluginDelegate::PlatformContext3D { public: explicit PlatformContext3DImpl(ggl::Context* parent_context); virtual ~PlatformContext3DImpl(); diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc index 7783dea..87aa127 100644 --- a/chrome/renderer/pepper_plugin_delegate_impl.cc +++ b/chrome/renderer/pepper_plugin_delegate_impl.cc @@ -41,10 +41,10 @@ #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/fileapi/file_system_callback_dispatcher.h" -#include "webkit/glue/plugins/pepper_file_io.h" -#include "webkit/glue/plugins/pepper_plugin_instance.h" -#include "webkit/glue/plugins/pepper_plugin_module.h" #include "webkit/glue/plugins/webplugin.h" +#include "webkit/plugins/ppapi/ppb_file_io_impl.h" +#include "webkit/plugins/ppapi/plugin_module.h" +#include "webkit/plugins/ppapi/ppapi_plugin_instance.h" #if defined(OS_MACOSX) #include "chrome/common/render_messages.h" @@ -62,7 +62,8 @@ namespace { const int32 kDefaultCommandBufferSize = 1024 * 1024; // Implements the Image2D using a TransportDIB. -class PlatformImage2DImpl : public pepper::PluginDelegate::PlatformImage2D { +class PlatformImage2DImpl + : public webkit::ppapi::PluginDelegate::PlatformImage2D { public: // This constructor will take ownership of the dib pointer. PlatformImage2DImpl(int width, int height, TransportDIB* dib) @@ -100,7 +101,7 @@ class PlatformImage2DImpl : public pepper::PluginDelegate::PlatformImage2D { class PlatformAudioImpl - : public pepper::PluginDelegate::PlatformAudio, + : public webkit::ppapi::PluginDelegate::PlatformAudio, public AudioMessageFilter::Delegate, public base::RefCountedThreadSafe<PlatformAudioImpl> { public: @@ -119,7 +120,7 @@ class PlatformAudioImpl // Initialize this audio context. StreamCreated() will be called when the // stream is created. bool Initialize(uint32_t sample_rate, uint32_t sample_count, - pepper::PluginDelegate::PlatformAudio::Client* client); + webkit::ppapi::PluginDelegate::PlatformAudio::Client* client); virtual bool StartPlayback() { return filter_ && filter_->Send( @@ -151,7 +152,7 @@ class PlatformAudioImpl virtual void OnVolume(double volume) { } // The client to notify when the stream is created. - pepper::PluginDelegate::PlatformAudio::Client* client_; + webkit::ppapi::PluginDelegate::PlatformAudio::Client* client_; // MessageFilter used to send/receive IPC. scoped_refptr<AudioMessageFilter> filter_; // Our ID on the MessageFilter. @@ -164,7 +165,7 @@ class PlatformAudioImpl bool PlatformAudioImpl::Initialize( uint32_t sample_rate, uint32_t sample_count, - pepper::PluginDelegate::PlatformAudio::Client* client) { + webkit::ppapi::PluginDelegate::PlatformAudio::Client* client) { DCHECK(client); // Make sure we don't call init more than once. @@ -224,7 +225,7 @@ void PlatformAudioImpl::ShutDown() { // Implements the VideoDecoder. class PlatformVideoDecoderImpl - : public pepper::PluginDelegate::PlatformVideoDecoder { + : public webkit::ppapi::PluginDelegate::PlatformVideoDecoder { public: PlatformVideoDecoderImpl() : input_buffer_size_(0), @@ -308,7 +309,8 @@ class PlatformVideoDecoderImpl DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl); }; -class DispatcherWrapper : public pepper::PluginDelegate::OutOfProcessProxy { +class DispatcherWrapper + : public webkit::ppapi::PluginDelegate::OutOfProcessProxy { public: DispatcherWrapper() {} virtual ~DispatcherWrapper() {} @@ -366,7 +368,7 @@ PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) PepperPluginDelegateImpl::~PepperPluginDelegateImpl() { } -scoped_refptr<pepper::PluginModule> +scoped_refptr<webkit::ppapi::PluginModule> PepperPluginDelegateImpl::CreatePepperPlugin(const FilePath& path) { // Easy case is in-process plugins. if (!PepperPluginRegistry::GetInstance()->RunOutOfProcessForPlugin(path)) @@ -378,16 +380,18 @@ PepperPluginDelegateImpl::CreatePepperPlugin(const FilePath& path) { render_view_->Send(new ViewHostMsg_OpenChannelToPepperPlugin( path, &plugin_process_handle, &channel_handle)); if (channel_handle.name.empty()) - return scoped_refptr<pepper::PluginModule>(); // Couldn't be initialized. + return scoped_refptr<webkit::ppapi::PluginModule>(); // Couldn't be initialized. // Create a new HostDispatcher for the proxying, and hook it to a new // PluginModule. - scoped_refptr<pepper::PluginModule> module(new pepper::PluginModule); + scoped_refptr<webkit::ppapi::PluginModule> module( + new webkit::ppapi::PluginModule); scoped_ptr<DispatcherWrapper> dispatcher(new DispatcherWrapper); - if (!dispatcher->Init(plugin_process_handle, channel_handle, - module->pp_module(), - pepper::PluginModule::GetLocalGetInterfaceFunc())) - return scoped_refptr<pepper::PluginModule>(); + if (!dispatcher->Init( + plugin_process_handle, channel_handle, + module->pp_module(), + webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc())) + return scoped_refptr<webkit::ppapi::PluginModule>(); module->InitAsProxied(dispatcher.release()); return module; } @@ -396,7 +400,7 @@ void PepperPluginDelegateImpl::ViewInitiatedPaint() { // Notify all of our instances that we started painting. This is used for // internal bookkeeping only, so we know that the set can not change under // us. - for (std::set<pepper::PluginInstance*>::iterator i = + for (std::set<webkit::ppapi::PluginInstance*>::iterator i = active_instances_.begin(); i != active_instances_.end(); ++i) (*i)->ViewInitiatedPaint(); @@ -407,8 +411,8 @@ void PepperPluginDelegateImpl::ViewFlushedPaint() { // we it may ask to close itself as a result. This will, in turn, modify our // set, possibly invalidating the iterator. So we iterate on a copy that // won't change out from under us. - std::set<pepper::PluginInstance*> plugins = active_instances_; - for (std::set<pepper::PluginInstance*>::iterator i = plugins.begin(); + std::set<webkit::ppapi::PluginInstance*> plugins = active_instances_; + for (std::set<webkit::ppapi::PluginInstance*>::iterator i = plugins.begin(); i != plugins.end(); ++i) { // The copy above makes sure our iterator is never invalid if some plugins // are destroyed. But some plugin may decide to close all of its views in @@ -436,10 +440,10 @@ bool PepperPluginDelegateImpl::GetBitmapForOptimizedPluginPaint( TransportDIB** dib, gfx::Rect* location, gfx::Rect* clip) { - for (std::set<pepper::PluginInstance*>::iterator i = + for (std::set<webkit::ppapi::PluginInstance*>::iterator i = active_instances_.begin(); i != active_instances_.end(); ++i) { - pepper::PluginInstance* instance = *i; + webkit::ppapi::PluginInstance* instance = *i; if (instance->GetBitmapForOptimizedPluginPaint( paint_bounds, dib, location, clip)) return true; @@ -448,7 +452,7 @@ bool PepperPluginDelegateImpl::GetBitmapForOptimizedPluginPaint( } void PepperPluginDelegateImpl::InstanceCreated( - pepper::PluginInstance* instance) { + webkit::ppapi::PluginInstance* instance) { active_instances_.insert(instance); // Set the initial focus. @@ -456,11 +460,11 @@ void PepperPluginDelegateImpl::InstanceCreated( } void PepperPluginDelegateImpl::InstanceDeleted( - pepper::PluginInstance* instance) { + webkit::ppapi::PluginInstance* instance) { active_instances_.erase(instance); } -pepper::PluginDelegate::PlatformImage2D* +webkit::ppapi::PluginDelegate::PlatformImage2D* PepperPluginDelegateImpl::CreateImage2D(int width, int height) { uint32 buffer_size = width * height * 4; @@ -496,7 +500,7 @@ PepperPluginDelegateImpl::CreateImage2D(int width, int height) { return new PlatformImage2DImpl(width, height, dib); } -pepper::PluginDelegate::PlatformContext3D* +webkit::ppapi::PluginDelegate::PlatformContext3D* PepperPluginDelegateImpl::CreateContext3D() { #ifdef ENABLE_GPU WebGraphicsContext3DCommandBufferImpl* context = @@ -515,7 +519,7 @@ pepper::PluginDelegate::PlatformContext3D* #endif } -pepper::PluginDelegate::PlatformVideoDecoder* +webkit::ppapi::PluginDelegate::PlatformVideoDecoder* PepperPluginDelegateImpl::CreateVideoDecoder( const PP_VideoDecoderConfig_Dev& decoder_config) { scoped_ptr<PlatformVideoDecoderImpl> decoder(new PlatformVideoDecoderImpl()); @@ -538,9 +542,10 @@ void PepperPluginDelegateImpl::SelectedFindResultChanged(int identifier, identifier, index + 1, WebKit::WebRect()); } -pepper::PluginDelegate::PlatformAudio* PepperPluginDelegateImpl::CreateAudio( +webkit::ppapi::PluginDelegate::PlatformAudio* +PepperPluginDelegateImpl::CreateAudio( uint32_t sample_rate, uint32_t sample_count, - pepper::PluginDelegate::PlatformAudio::Client* client) { + webkit::ppapi::PluginDelegate::PlatformAudio::Client* client) { scoped_refptr<PlatformAudioImpl> audio( new PlatformAudioImpl(render_view_->audio_message_filter())); if (audio->Initialize(sample_rate, sample_count, client)) { @@ -582,7 +587,7 @@ void PepperPluginDelegateImpl::OnAsyncFileOpened( } void PepperPluginDelegateImpl::OnSetFocus(bool has_focus) { - for (std::set<pepper::PluginInstance*>::iterator i = + for (std::set<webkit::ppapi::PluginInstance*>::iterator i = active_instances_.begin(); i != active_instances_.end(); ++i) (*i)->SetContentAreaFocus(has_focus); @@ -755,7 +760,7 @@ base::PlatformFileError PepperPluginDelegateImpl::QueryModuleLocalFile( base::PlatformFileError PepperPluginDelegateImpl::GetModuleLocalDirContents( const std::string& module_name, const FilePath& path, - PepperDirContents* contents) { + webkit::ppapi::DirContents* contents) { FilePath full_path = GetModuleLocalFilePath(module_name, path); if (full_path.empty()) { return base::PLATFORM_FILE_ERROR_ACCESS_DENIED; @@ -774,9 +779,9 @@ PepperPluginDelegateImpl::GetFileThreadMessageLoopProxy() { return RenderThread::current()->GetFileThreadMessageLoopProxy(); } -pepper::FullscreenContainer* +webkit::ppapi::FullscreenContainer* PepperPluginDelegateImpl::CreateFullscreenContainer( - pepper::PluginInstance* instance) { + webkit::ppapi::PluginInstance* instance) { return render_view_->CreatePepperFullscreenContainer(instance); } diff --git a/chrome/renderer/pepper_plugin_delegate_impl.h b/chrome/renderer/pepper_plugin_delegate_impl.h index d59be3b..783cfc8 100644 --- a/chrome/renderer/pepper_plugin_delegate_impl.h +++ b/chrome/renderer/pepper_plugin_delegate_impl.h @@ -14,8 +14,8 @@ #include "base/ref_counted.h" #include "base/weak_ptr.h" #include "ppapi/c/pp_errors.h" -#include "webkit/glue/plugins/pepper_plugin_delegate.h" -#include "webkit/glue/plugins/pepper_plugin_instance.h" +#include "webkit/plugins/ppapi/plugin_delegate.h" +#include "webkit/plugins/ppapi/ppapi_plugin_instance.h" class FilePath; class RenderView; @@ -24,11 +24,14 @@ namespace gfx { class Rect; } -namespace pepper { -class FileIO; +namespace webkit { +namespace ppapi { + class PluginInstance; class PluginModule; -} + +} // namespace ppapi +} // namespace webkit namespace WebKit { class WebFileChooserCompletion; @@ -38,13 +41,14 @@ struct WebFileChooserParams; class TransportDIB; class PepperPluginDelegateImpl - : public pepper::PluginDelegate, + : public webkit::ppapi::PluginDelegate, public base::SupportsWeakPtr<PepperPluginDelegateImpl> { public: explicit PepperPluginDelegateImpl(RenderView* render_view); virtual ~PepperPluginDelegateImpl(); - scoped_refptr<pepper::PluginModule> CreatePepperPlugin(const FilePath& path); + scoped_refptr<webkit::ppapi::PluginModule> CreatePepperPlugin( + const FilePath& path); // Called by RenderView to tell us about painting events, these two functions // just correspond to the DidInitiatePaint and DidFlushPaint in R.V.. @@ -68,13 +72,15 @@ class PepperPluginDelegateImpl // notifies all of the plugins. void OnSetFocus(bool has_focus); - // pepper::PluginDelegate implementation. - virtual void InstanceCreated(pepper::PluginInstance* instance); - virtual void InstanceDeleted(pepper::PluginInstance* instance); + // PluginDelegate implementation. + virtual void InstanceCreated( + webkit::ppapi::PluginInstance* instance); + virtual void InstanceDeleted( + webkit::ppapi::PluginInstance* instance); virtual PlatformAudio* CreateAudio( uint32_t sample_rate, uint32_t sample_count, - pepper::PluginDelegate::PlatformAudio::Client* client); + PlatformAudio::Client* client); virtual PlatformImage2D* CreateImage2D(int width, int height); virtual PlatformContext3D* CreateContext3D(); virtual PlatformVideoDecoder* CreateVideoDecoder( @@ -133,10 +139,11 @@ class PepperPluginDelegateImpl virtual base::PlatformFileError GetModuleLocalDirContents( const std::string& module_name, const FilePath& path, - PepperDirContents* contents); + webkit::ppapi::DirContents* contents); virtual scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy(); - virtual pepper::FullscreenContainer* CreateFullscreenContainer( - pepper::PluginInstance* instance); + virtual webkit::ppapi::FullscreenContainer* + CreateFullscreenContainer( + webkit::ppapi::PluginInstance* instance); virtual std::string GetDefaultEncoding(); virtual void ZoomLimitsChanged(double minimum_factor, double maximum_factor); virtual std::string ResolveProxy(const GURL& url); @@ -148,7 +155,7 @@ class PepperPluginDelegateImpl // Pointer to the RenderView that owns us. RenderView* render_view_; - std::set<pepper::PluginInstance*> active_instances_; + std::set<webkit::ppapi::PluginInstance*> active_instances_; int id_generator_; IDMap<AsyncOpenFileCallback> messages_waiting_replies_; diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 1ef1e18..9846cbb 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -175,7 +175,6 @@ #include "webkit/glue/media/video_renderer_impl.h" #include "webkit/glue/password_form_dom_manager.h" #include "webkit/glue/plugins/default_plugin_shared.h" -#include "webkit/glue/plugins/pepper_webplugin_impl.h" #include "webkit/glue/plugins/plugin_list.h" #include "webkit/glue/plugins/webplugin_delegate.h" #include "webkit/glue/plugins/webplugin_delegate_impl.h" @@ -187,6 +186,7 @@ #include "webkit/glue/webdropdata.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webmediaplayer_impl.h" +#include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" #if defined(OS_WIN) // TODO(port): these files are currently Windows only because they concern: @@ -845,7 +845,7 @@ WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, if (!found || !info.enabled) return NULL; - scoped_refptr<pepper::PluginModule> pepper_module( + scoped_refptr<webkit::ppapi::PluginModule> pepper_module( pepper_delegate_.CreatePepperPlugin(info.path)); if (pepper_module) return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); @@ -2128,8 +2128,9 @@ WebWidget* RenderView::createFullscreenWindow(WebKit::WebPopupType popup_type) { return widget->webwidget(); } -pepper::FullscreenContainer* RenderView::CreatePepperFullscreenContainer( - pepper::PluginInstance* plugin) { +webkit::ppapi::FullscreenContainer* +RenderView::CreatePepperFullscreenContainer( + webkit::ppapi::PluginInstance* plugin) { RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create(routing_id_, render_thread_, plugin); widget->show(WebKit::WebNavigationPolicyIgnore); @@ -2781,7 +2782,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, if (info.path.value() == kDefaultPluginLibraryName || plugin_setting == CONTENT_SETTING_ALLOW || host_setting == CONTENT_SETTING_ALLOW) { - scoped_refptr<pepper::PluginModule> pepper_module( + scoped_refptr<webkit::ppapi::PluginModule> pepper_module( pepper_delegate_.CreatePepperPlugin(info.path)); if (pepper_module) return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); @@ -4429,11 +4430,12 @@ void RenderView::ClearBlockedContentSettings() { content_blocked_[i] = false; } -WebPlugin* RenderView::CreatePepperPlugin(WebFrame* frame, - const WebPluginParams& params, - const FilePath& path, - pepper::PluginModule* pepper_module) { - return new pepper::WebPluginImpl( +WebPlugin* RenderView::CreatePepperPlugin( + WebFrame* frame, + const WebPluginParams& params, + const FilePath& path, + webkit::ppapi::PluginModule* pepper_module) { + return new webkit::ppapi::WebPluginImpl( pepper_module, params, pepper_delegate_.AsWeakPtr()); } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 3d73c7c..ffe7ebf 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -96,10 +96,14 @@ class Point; class Rect; } -namespace pepper { +namespace webkit { +namespace ppapi { + class PluginInstance; class FullscreenContainer; -} + +} // namespace ppapi +} // namespace webkit namespace safe_browsing { class PhishingClassifierDelegate; @@ -331,8 +335,8 @@ class RenderView : public RenderWidget, void OnPepperPluginDestroy(WebPluginDelegatePepper* pepper_plugin); // Creates a fullscreen container for a pepper plugin instance. - pepper::FullscreenContainer* CreatePepperFullscreenContainer( - pepper::PluginInstance* plugin); + webkit::ppapi::FullscreenContainer* CreatePepperFullscreenContainer( + webkit::ppapi::PluginInstance* plugin); // Create a new plugin without checking the content settings. WebKit::WebPlugin* CreatePluginNoCheck(WebKit::WebFrame* frame, @@ -1013,10 +1017,11 @@ class RenderView : public RenderWidget, const std::string& mime_type); // Create a new Pepper plugin. - WebKit::WebPlugin* CreatePepperPlugin(WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - const FilePath& path, - pepper::PluginModule* pepper_module); + WebKit::WebPlugin* CreatePepperPlugin( + WebKit::WebFrame* frame, + const WebKit::WebPluginParams& params, + const FilePath& path, + webkit::ppapi::PluginModule* pepper_module); WebKit::WebPlugin* CreateOutdatedPluginPlaceholder( WebKit::WebFrame* frame, diff --git a/chrome/renderer/render_widget_fullscreen_pepper.cc b/chrome/renderer/render_widget_fullscreen_pepper.cc index 97e32db..3df4be2 100644 --- a/chrome/renderer/render_widget_fullscreen_pepper.cc +++ b/chrome/renderer/render_widget_fullscreen_pepper.cc @@ -9,8 +9,8 @@ #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" #include "third_party/WebKit/WebKit/chromium/public/WebWidget.h" -#include "webkit/glue/plugins/pepper_fullscreen_container.h" -#include "webkit/glue/plugins/pepper_plugin_instance.h" +#include "webkit/plugins/ppapi/fullscreen_container.h" +#include "webkit/plugins/ppapi/ppapi_plugin_instance.h" using WebKit::WebCanvas; using WebKit::WebCompositionUnderline; @@ -29,7 +29,7 @@ namespace { // WebWidget that simply wraps the pepper plugin. class PepperWidget : public WebWidget { public: - PepperWidget(pepper::PluginInstance* plugin, + PepperWidget(webkit::ppapi::PluginInstance* plugin, RenderWidgetFullscreenPepper* widget) : plugin_(plugin), widget_(widget), @@ -119,7 +119,7 @@ class PepperWidget : public WebWidget { } private: - pepper::PluginInstance* plugin_; + webkit::ppapi::PluginInstance* plugin_; RenderWidgetFullscreenPepper* widget_; WebSize size_; WebCursorInfo cursor_; @@ -130,7 +130,8 @@ class PepperWidget : public WebWidget { // A FullscreenContainer that forwards the API calls to the // RenderWidgetFullscreenPepper. -class WidgetFullscreenContainer : public pepper::FullscreenContainer { +class WidgetFullscreenContainer + : public webkit::ppapi::FullscreenContainer { public: explicit WidgetFullscreenContainer(RenderWidgetFullscreenPepper* widget) : widget_(widget) { @@ -164,7 +165,7 @@ class WidgetFullscreenContainer : public pepper::FullscreenContainer { // static RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( int32 opener_id, RenderThreadBase* render_thread, - pepper::PluginInstance* plugin) { + webkit::ppapi::PluginInstance* plugin) { DCHECK_NE(MSG_ROUTING_NONE, opener_id); scoped_refptr<RenderWidgetFullscreenPepper> widget( new RenderWidgetFullscreenPepper(render_thread, plugin)); @@ -173,7 +174,8 @@ RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( } RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( - RenderThreadBase* render_thread, pepper::PluginInstance* plugin) + RenderThreadBase* render_thread, + webkit::ppapi::PluginInstance* plugin) : RenderWidgetFullscreen(render_thread, WebKit::WebPopupTypeSelect), plugin_(plugin), ALLOW_THIS_IN_INITIALIZER_LIST( diff --git a/chrome/renderer/render_widget_fullscreen_pepper.h b/chrome/renderer/render_widget_fullscreen_pepper.h index 862d57d..4d74b1d 100644 --- a/chrome/renderer/render_widget_fullscreen_pepper.h +++ b/chrome/renderer/render_widget_fullscreen_pepper.h @@ -8,10 +8,14 @@ #include "chrome/renderer/render_widget_fullscreen.h" #include "third_party/WebKit/WebKit/chromium/public/WebWidget.h" -namespace pepper { +namespace webkit { +namespace ppapi { + class PluginInstance; class FullscreenContainer; -} + +} // namespace ppapi +} // namespace webkit // A RenderWidget that hosts a fullscreen pepper plugin. This provides a // FullscreenContainer that the plugin instance can callback into to e.g. @@ -21,7 +25,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen { static RenderWidgetFullscreenPepper* Create( int32 opener_id, RenderThreadBase* render_thread, - pepper::PluginInstance* plugin); + webkit::ppapi::PluginInstance* plugin); // Asks the browser to close this view, which will tear off the window and // close this widget. @@ -30,11 +34,13 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen { // Invalidate the whole widget to force a redraw. void GenerateFullRepaint(); - pepper::FullscreenContainer* container() const { return container_.get(); } + webkit::ppapi::FullscreenContainer* container() const { + return container_.get(); + } protected: RenderWidgetFullscreenPepper(RenderThreadBase* render_thread, - pepper::PluginInstance* plugin); + webkit::ppapi::PluginInstance* plugin); virtual ~RenderWidgetFullscreenPepper(); // RenderWidget API. @@ -52,10 +58,10 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen { private: // The plugin instance this widget wraps. - pepper::PluginInstance* plugin_; + webkit::ppapi::PluginInstance* plugin_; // The FullscreenContainer that the plugin instance can callback into. - scoped_ptr<pepper::FullscreenContainer> container_; + scoped_ptr<webkit::ppapi::FullscreenContainer> container_; DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); }; |