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

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: rebase Created 8 years 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 const FilePath& file_path) { 764 const FilePath& file_path) {
765 return GetContentClient()->renderer()->CreatePluginReplacement( 765 return GetContentClient()->renderer()->CreatePluginReplacement(
766 render_view_, file_path); 766 render_view_, file_path);
767 } 767 }
768 768
769 webkit::ppapi::PluginDelegate::PlatformImage2D* 769 webkit::ppapi::PluginDelegate::PlatformImage2D*
770 PepperPluginDelegateImpl::CreateImage2D(int width, int height) { 770 PepperPluginDelegateImpl::CreateImage2D(int width, int height) {
771 return PepperPlatformImage2DImpl::Create(width, height); 771 return PepperPlatformImage2DImpl::Create(width, height);
772 } 772 }
773 773
774 webkit::ppapi::PluginDelegate::PlatformGraphics2D*
775 PepperPluginDelegateImpl::GetGraphics2D(
776 webkit::ppapi::PluginInstance* instance,
777 PP_Resource resource) {
778 RendererPpapiHostImpl* host_impl = static_cast<RendererPpapiHostImpl*>(
779 instance->module()->GetEmbedderState());
780 return host_impl->GetPlatformGraphics2D(resource);
781 }
782
774 webkit::ppapi::PluginDelegate::PlatformContext3D* 783 webkit::ppapi::PluginDelegate::PlatformContext3D*
775 PepperPluginDelegateImpl::CreateContext3D() { 784 PepperPluginDelegateImpl::CreateContext3D() {
776 #ifdef ENABLE_GPU 785 #ifdef ENABLE_GPU
777 // If accelerated compositing of plugins is disabled, fail to create a 3D 786 // If accelerated compositing of plugins is disabled, fail to create a 3D
778 // context, because it won't be visible. This allows graceful fallback in the 787 // context, because it won't be visible. This allows graceful fallback in the
779 // modules. 788 // modules.
780 const webkit_glue::WebPreferences& prefs = render_view_->webkit_preferences(); 789 const webkit_glue::WebPreferences& prefs = render_view_->webkit_preferences();
781 if (!prefs.accelerated_compositing_for_plugins_enabled) 790 if (!prefs.accelerated_compositing_for_plugins_enabled)
782 return NULL; 791 return NULL;
783 return new PlatformContext3DImpl(this); 792 return new PlatformContext3DImpl(this);
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 RenderWidgetFullscreenPepper* container = 1813 RenderWidgetFullscreenPepper* container =
1805 static_cast<RenderWidgetFullscreenPepper*>( 1814 static_cast<RenderWidgetFullscreenPepper*>(
1806 instance->fullscreen_container()); 1815 instance->fullscreen_container());
1807 return container->mouse_lock_dispatcher(); 1816 return container->mouse_lock_dispatcher();
1808 } else { 1817 } else {
1809 return render_view_->mouse_lock_dispatcher(); 1818 return render_view_->mouse_lock_dispatcher();
1810 } 1819 }
1811 } 1820 }
1812 1821
1813 } // namespace content 1822 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/pepper/renderer_ppapi_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698