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

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: fix DEPS Created 8 years, 2 months 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 const FilePath& file_path) { 768 const FilePath& file_path) {
769 return GetContentClient()->renderer()->CreatePluginReplacement( 769 return GetContentClient()->renderer()->CreatePluginReplacement(
770 render_view_, file_path); 770 render_view_, file_path);
771 } 771 }
772 772
773 webkit::ppapi::PluginDelegate::PlatformImage2D* 773 webkit::ppapi::PluginDelegate::PlatformImage2D*
774 PepperPluginDelegateImpl::CreateImage2D(int width, int height) { 774 PepperPluginDelegateImpl::CreateImage2D(int width, int height) {
775 return PepperPlatformImage2DImpl::Create(width, height); 775 return PepperPlatformImage2DImpl::Create(width, height);
776 } 776 }
777 777
778 webkit::ppapi::PluginDelegate::PlatformGraphics2D*
779 PepperPluginDelegateImpl::GetGraphics2D(
780 webkit::ppapi::PluginInstance* instance,
781 PP_Resource resource) {
782 RendererPpapiHostImpl* host_impl = static_cast<RendererPpapiHostImpl*>(
783 instance->module()->GetEmbedderState());
784 return host_impl->GetPlatformGraphics2D(resource);
785 }
786
778 webkit::ppapi::PluginDelegate::PlatformContext3D* 787 webkit::ppapi::PluginDelegate::PlatformContext3D*
779 PepperPluginDelegateImpl::CreateContext3D() { 788 PepperPluginDelegateImpl::CreateContext3D() {
780 #ifdef ENABLE_GPU 789 #ifdef ENABLE_GPU
781 // If accelerated compositing of plugins is disabled, fail to create a 3D 790 // If accelerated compositing of plugins is disabled, fail to create a 3D
782 // context, because it won't be visible. This allows graceful fallback in the 791 // context, because it won't be visible. This allows graceful fallback in the
783 // modules. 792 // modules.
784 if (!render_view_->webkit_preferences().accelerated_plugins_enabled) 793 if (!render_view_->webkit_preferences().accelerated_plugins_enabled)
785 return NULL; 794 return NULL;
786 return new PlatformContext3DImpl(this); 795 return new PlatformContext3DImpl(this);
787 #else 796 #else
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 else 1883 else
1875 return render_view_->mouse_lock_dispatcher(); 1884 return render_view_->mouse_lock_dispatcher();
1876 } 1885 }
1877 1886
1878 webkit_glue::ClipboardClient* 1887 webkit_glue::ClipboardClient*
1879 PepperPluginDelegateImpl::CreateClipboardClient() const { 1888 PepperPluginDelegateImpl::CreateClipboardClient() const {
1880 return new RendererClipboardClient; 1889 return new RendererClipboardClient;
1881 } 1890 }
1882 1891
1883 } // namespace content 1892 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698