Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(994)

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: temp dependencies Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 const FilePath& file_path) { 782 const FilePath& file_path) {
783 return GetContentClient()->renderer()->CreatePluginReplacement( 783 return GetContentClient()->renderer()->CreatePluginReplacement(
784 render_view_, file_path); 784 render_view_, file_path);
785 } 785 }
786 786
787 webkit::ppapi::PluginDelegate::PlatformImage2D* 787 webkit::ppapi::PluginDelegate::PlatformImage2D*
788 PepperPluginDelegateImpl::CreateImage2D(int width, int height) { 788 PepperPluginDelegateImpl::CreateImage2D(int width, int height) {
789 return PepperPlatformImage2DImpl::Create(width, height); 789 return PepperPlatformImage2DImpl::Create(width, height);
790 } 790 }
791 791
792 webkit::ppapi::PluginDelegate::PlatformGraphics2D*
793 PepperPluginDelegateImpl::GetGraphics2D(
794 webkit::ppapi::PluginInstance* instance,
795 PP_Resource resource) {
796 RendererPpapiHostImpl* host_impl = static_cast<RendererPpapiHostImpl*>(
797 instance->module()->GetEmbedderState());
798 return host_impl->GetPlatformGraphics2D(resource);
799 }
800
792 webkit::ppapi::PluginDelegate::PlatformContext3D* 801 webkit::ppapi::PluginDelegate::PlatformContext3D*
793 PepperPluginDelegateImpl::CreateContext3D() { 802 PepperPluginDelegateImpl::CreateContext3D() {
794 #ifdef ENABLE_GPU 803 #ifdef ENABLE_GPU
795 // If accelerated compositing of plugins is disabled, fail to create a 3D 804 // If accelerated compositing of plugins is disabled, fail to create a 3D
796 // context, because it won't be visible. This allows graceful fallback in the 805 // context, because it won't be visible. This allows graceful fallback in the
797 // modules. 806 // modules.
798 if (!render_view_->webkit_preferences().accelerated_plugins_enabled) 807 if (!render_view_->webkit_preferences().accelerated_plugins_enabled)
799 return NULL; 808 return NULL;
800 return new PlatformContext3DImpl(this); 809 return new PlatformContext3DImpl(this);
801 #else 810 #else
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 RenderWidgetFullscreenPepper* container = 1867 RenderWidgetFullscreenPepper* container =
1859 static_cast<RenderWidgetFullscreenPepper*>( 1868 static_cast<RenderWidgetFullscreenPepper*>(
1860 instance->fullscreen_container()); 1869 instance->fullscreen_container());
1861 return container->mouse_lock_dispatcher(); 1870 return container->mouse_lock_dispatcher();
1862 } else { 1871 } else {
1863 return render_view_->mouse_lock_dispatcher(); 1872 return render_view_->mouse_lock_dispatcher();
1864 } 1873 }
1865 } 1874 }
1866 1875
1867 } // namespace content 1876 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698