| OLD | NEW | 
|     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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   801 PepperPluginDelegateImpl::CreateImage2D(int width, int height) { |   801 PepperPluginDelegateImpl::CreateImage2D(int width, int height) { | 
|   802   return PepperPlatformImage2DImpl::Create(width, height); |   802   return PepperPlatformImage2DImpl::Create(width, height); | 
|   803 } |   803 } | 
|   804  |   804  | 
|   805 webkit::ppapi::PluginDelegate::PlatformContext3D* |   805 webkit::ppapi::PluginDelegate::PlatformContext3D* | 
|   806     PepperPluginDelegateImpl::CreateContext3D() { |   806     PepperPluginDelegateImpl::CreateContext3D() { | 
|   807 #ifdef ENABLE_GPU |   807 #ifdef ENABLE_GPU | 
|   808   // If accelerated compositing of plugins is disabled, fail to create a 3D |   808   // If accelerated compositing of plugins is disabled, fail to create a 3D | 
|   809   // context, because it won't be visible. This allows graceful fallback in the |   809   // context, because it won't be visible. This allows graceful fallback in the | 
|   810   // modules. |   810   // modules. | 
|   811   if (!render_view_->webkit_preferences().accelerated_plugins_enabled) |   811   const webkit_glue::WebPreferences& prefs = render_view_->webkit_preferences(); | 
 |   812   if (!prefs.accelerated_compositing_for_plugins_enabled) | 
|   812     return NULL; |   813     return NULL; | 
|   813   return new PlatformContext3DImpl(this); |   814   return new PlatformContext3DImpl(this); | 
|   814 #else |   815 #else | 
|   815   return NULL; |   816   return NULL; | 
|   816 #endif |   817 #endif | 
|   817 } |   818 } | 
|   818  |   819  | 
|   819 void PepperPluginDelegateImpl::ReparentContext( |   820 void PepperPluginDelegateImpl::ReparentContext( | 
|   820     webkit::ppapi::PluginDelegate::PlatformContext3D* context) { |   821     webkit::ppapi::PluginDelegate::PlatformContext3D* context) { | 
|   821   static_cast<PlatformContext3DImpl*>(context)->SetParentContext(this); |   822   static_cast<PlatformContext3DImpl*>(context)->SetParentContext(this); | 
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1871     RenderWidgetFullscreenPepper* container = |  1872     RenderWidgetFullscreenPepper* container = | 
|  1872         static_cast<RenderWidgetFullscreenPepper*>( |  1873         static_cast<RenderWidgetFullscreenPepper*>( | 
|  1873             instance->fullscreen_container()); |  1874             instance->fullscreen_container()); | 
|  1874     return container->mouse_lock_dispatcher(); |  1875     return container->mouse_lock_dispatcher(); | 
|  1875   } else { |  1876   } else { | 
|  1876     return render_view_->mouse_lock_dispatcher(); |  1877     return render_view_->mouse_lock_dispatcher(); | 
|  1877   } |  1878   } | 
|  1878 } |  1879 } | 
|  1879  |  1880  | 
|  1880 }  // namespace content |  1881 }  // namespace content | 
| OLD | NEW |