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

Side by Side Diff: webkit/plugins/npapi/plugin_host.cc

Issue 10837158: mac: Delete more 10.5-only code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mark Created 8 years, 4 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 | Annotate | Revision Log
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 "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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return NULL; 51 return NULL;
52 } 52 }
53 return reinterpret_cast<PluginInstance*>(id->ndata); 53 return reinterpret_cast<PluginInstance*>(id->ndata);
54 } 54 }
55 55
56 #if defined(OS_MACOSX) 56 #if defined(OS_MACOSX)
57 // Returns true if Core Animation plugins are supported. This requires that the 57 // Returns true if Core Animation plugins are supported. This requires that the
58 // OS supports shared accelerated surfaces via IOSurface. This is true on Snow 58 // OS supports shared accelerated surfaces via IOSurface. This is true on Snow
59 // Leopard and higher. 59 // Leopard and higher.
60 static bool SupportsCoreAnimationPlugins() { 60 static bool SupportsCoreAnimationPlugins() {
61 if (base::mac::IsOSLeopardOrEarlier())
62 return false;
63 if (CommandLine::ForCurrentProcess()->HasSwitch( 61 if (CommandLine::ForCurrentProcess()->HasSwitch(
64 switches::kDisableCoreAnimationPlugins)) 62 switches::kDisableCoreAnimationPlugins))
65 return false; 63 return false;
66 // We also need to be running with desktop GL and not the software 64 // We also need to be running with desktop GL and not the software
67 // OSMesa renderer in order to share accelerated surfaces between 65 // OSMesa renderer in order to share accelerated surfaces between
68 // processes. 66 // processes.
69 gfx::GLImplementation implementation = gfx::GetGLImplementation(); 67 gfx::GLImplementation implementation = gfx::GetGLImplementation();
70 if (implementation == gfx::kGLImplementationNone) { 68 if (implementation == gfx::kGLImplementationNone) {
71 // Not initialized yet. 69 // Not initialized yet.
72 if (!gfx::GLSurface::InitializeOneOff()) { 70 if (!gfx::GLSurface::InitializeOneOff()) {
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 } 1126 }
1129 1127
1130 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { 1128 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) {
1131 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); 1129 scoped_refptr<PluginInstance> plugin(FindInstance(instance));
1132 if (plugin.get()) { 1130 if (plugin.get()) {
1133 plugin->URLRedirectResponse(!!allow, notify_data); 1131 plugin->URLRedirectResponse(!!allow, notify_data);
1134 } 1132 }
1135 } 1133 }
1136 1134
1137 } // extern "C" 1135 } // extern "C"
OLDNEW
« no previous file with comments | « ui/gfx/video_decode_acceleration_support_mac_unittest.mm ('k') | webkit/plugins/npapi/plugin_list_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698