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

Side by Side Diff: chrome/common/pepper_flash.cc

Issue 10947013: [OSX] All Flapper, all the time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/common/pepper_flash.h" 5 #include "chrome/common/pepper_flash.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return group != base::FieldTrial::kNotFinalized && 63 return group != base::FieldTrial::kNotFinalized &&
64 group != g_disabled_group_number; 64 group != g_disabled_group_number;
65 } 65 }
66 66
67 } // namespace 67 } // namespace
68 68
69 bool ConductingPepperFlashFieldTrial() { 69 bool ConductingPepperFlashFieldTrial() {
70 #if defined(OS_WIN) 70 #if defined(OS_WIN)
71 return true; 71 return true;
72 #elif defined(OS_MACOSX) 72 #elif defined(OS_MACOSX)
73 // Returning |true| here puts PepperFlash in the plugin list, by 73 return true;
74 // default after the built-in NPAPI Flash. Returning |true| from
75 // IsPepperFlashEnabledByDefault() puts PepperFlash above NPAPI
76 // Flash.
77 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
78 if (channel == chrome::VersionInfo::CHANNEL_CANARY ||
79 channel == chrome::VersionInfo::CHANNEL_DEV)
80 return true;
81
82 // TODO(shess): Don't expose for other channels, yet.
83 return false;
84 #else 74 #else
85 return false; 75 return false;
86 #endif 76 #endif
87 } 77 }
88 78
89 bool IsPepperFlashEnabledByDefault() { 79 bool IsPepperFlashEnabledByDefault() {
90 #if defined(USE_AURA) 80 #if defined(USE_AURA)
91 // Pepper Flash is required for Aura (on any OS). 81 // Pepper Flash is required for Aura (on any OS).
92 return true; 82 return true;
93 #elif defined(OS_WIN) 83 #elif defined(OS_WIN)
94 return true; 84 return true;
95 #elif defined(OS_LINUX) 85 #elif defined(OS_LINUX)
96 // For Linux, always try to use it (availability is checked elsewhere). 86 // For Linux, always try to use it (availability is checked elsewhere).
97 return true; 87 return true;
98 #elif defined(OS_MACOSX) 88 #elif defined(OS_MACOSX)
99 // PepperFlash is the default for CANARY and DEV. 89 return true;
100 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
101 if (channel == chrome::VersionInfo::CHANNEL_CANARY ||
102 channel == chrome::VersionInfo::CHANNEL_DEV)
103 return true;
104
105 // PepperFlash is opt-in on any other channels where it is exposed.
106 return false;
107 #else 90 #else
108 return false; 91 return false;
109 #endif 92 #endif
110 } 93 }
111 94
112 int32 kPepperFlashPermissions = ppapi::PERMISSION_DEV | 95 int32 kPepperFlashPermissions = ppapi::PERMISSION_DEV |
113 ppapi::PERMISSION_PRIVATE | 96 ppapi::PERMISSION_PRIVATE |
114 ppapi::PERMISSION_BYPASS_USER_GESTURE; 97 ppapi::PERMISSION_BYPASS_USER_GESTURE;
115 98
116 99
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698