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 "webkit/plugins/npapi/plugin_host.h" | 5 #include "webkit/plugins/npapi/plugin_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Not initialized yet. | 67 // Not initialized yet. |
68 if (!gfx::GLSurface::InitializeOneOff()) { | 68 if (!gfx::GLSurface::InitializeOneOff()) { |
69 return false; | 69 return false; |
70 } | 70 } |
71 implementation = gfx::GetGLImplementation(); | 71 implementation = gfx::GetGLImplementation(); |
72 } | 72 } |
73 return (implementation == gfx::kGLImplementationDesktopGL); | 73 return (implementation == gfx::kGLImplementationDesktopGL); |
74 } | 74 } |
75 | 75 |
76 static bool UsingCompositedCoreAnimationPlugins() { | 76 static bool UsingCompositedCoreAnimationPlugins() { |
77 // Temporarily disabling composited core animation plugins | 77 return !CommandLine::ForCurrentProcess()->HasSwitch( |
78 return false && !CommandLine::ForCurrentProcess()->HasSwitch( | |
79 switches::kDisableCompositedCoreAnimationPlugins); | 78 switches::kDisableCompositedCoreAnimationPlugins); |
80 } | 79 } |
81 #endif | 80 #endif |
82 | 81 |
83 PluginHost::PluginHost() { | 82 PluginHost::PluginHost() { |
84 InitializeHostFuncs(); | 83 InitializeHostFuncs(); |
85 } | 84 } |
86 | 85 |
87 PluginHost::~PluginHost() { | 86 PluginHost::~PluginHost() { |
88 } | 87 } |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 } | 1152 } |
1154 | 1153 |
1155 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { | 1154 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { |
1156 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); | 1155 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); |
1157 if (plugin.get()) { | 1156 if (plugin.get()) { |
1158 plugin->URLRedirectResponse(!!allow, notify_data); | 1157 plugin->URLRedirectResponse(!!allow, notify_data); |
1159 } | 1158 } |
1160 } | 1159 } |
1161 | 1160 |
1162 } // extern "C" | 1161 } // extern "C" |
OLD | NEW |