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

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 upstream 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 const FilePath& file_path) { 822 const FilePath& file_path) {
823 return GetContentClient()->renderer()->CreatePluginReplacement( 823 return GetContentClient()->renderer()->CreatePluginReplacement(
824 render_view_, file_path); 824 render_view_, file_path);
825 } 825 }
826 826
827 webkit::ppapi::PluginDelegate::PlatformImage2D* 827 webkit::ppapi::PluginDelegate::PlatformImage2D*
828 PepperPluginDelegateImpl::CreateImage2D(int width, int height) { 828 PepperPluginDelegateImpl::CreateImage2D(int width, int height) {
829 return PepperPlatformImage2DImpl::Create(width, height); 829 return PepperPlatformImage2DImpl::Create(width, height);
830 } 830 }
831 831
832 webkit::ppapi::PluginDelegate::PlatformGraphics2D*
833 PepperPluginDelegateImpl::GetGraphics2D(
834 webkit::ppapi::PluginInstance* instance,
835 PP_Resource resource) {
836 RendererPpapiHostImpl* host_impl = static_cast<RendererPpapiHostImpl*>(
837 instance->module()->GetEmbedderState());
838 return host_impl->GetPlatformGraphics2D(resource);
839 }
840
832 webkit::ppapi::PluginDelegate::PlatformContext3D* 841 webkit::ppapi::PluginDelegate::PlatformContext3D*
833 PepperPluginDelegateImpl::CreateContext3D() { 842 PepperPluginDelegateImpl::CreateContext3D() {
834 #ifdef ENABLE_GPU 843 #ifdef ENABLE_GPU
835 // If accelerated compositing of plugins is disabled, fail to create a 3D 844 // If accelerated compositing of plugins is disabled, fail to create a 3D
836 // context, because it won't be visible. This allows graceful fallback in the 845 // context, because it won't be visible. This allows graceful fallback in the
837 // modules. 846 // modules.
838 if (!render_view_->webkit_preferences().accelerated_plugins_enabled) 847 if (!render_view_->webkit_preferences().accelerated_plugins_enabled)
839 return NULL; 848 return NULL;
840 return new PlatformContext3DImpl(this); 849 return new PlatformContext3DImpl(this);
841 #else 850 #else
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 else 1898 else
1890 return render_view_->mouse_lock_dispatcher(); 1899 return render_view_->mouse_lock_dispatcher();
1891 } 1900 }
1892 1901
1893 webkit_glue::ClipboardClient* 1902 webkit_glue::ClipboardClient*
1894 PepperPluginDelegateImpl::CreateClipboardClient() const { 1903 PepperPluginDelegateImpl::CreateClipboardClient() const {
1895 return new RendererClipboardClient; 1904 return new RendererClipboardClient;
1896 } 1905 }
1897 1906
1898 } // namespace content 1907 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698