Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/common/content_switches_internal.h" | 5 #include "content/common/content_switches_internal.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | |
| 10 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
| 11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 12 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
| 13 | 14 |
| 14 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
| 15 #include "base/win/windows_version.h" | 16 #include "base/win/windows_version.h" |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 23 const base::Feature kUseZoomForDsfEnabledByDefault { | |
|
Will Harris
2016/07/14 22:42:56
I use constexpr here but I think it's the same dif
Bret
2016/07/15 18:14:28
The example used const and this seems to work fine
| |
| 24 "use-zoom-for-dsf enabled by default", base::FEATURE_ENABLED_BY_DEFAULT | |
| 25 }; | |
| 26 | |
| 22 bool IsUseZoomForDSFEnabledByDefault() { | 27 bool IsUseZoomForDSFEnabledByDefault() { |
| 23 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 28 #if defined(OS_CHROMEOS) |
| 24 return true; | 29 return true; |
| 30 #elif defined(OS_WIN) | |
| 31 return base::FeatureList::IsEnabled(kUseZoomForDsfEnabledByDefault); | |
| 25 #else | 32 #else |
| 26 return false; | 33 return false; |
| 27 #endif | 34 #endif |
| 28 } | 35 } |
| 29 | 36 |
| 30 } // namespace | 37 } // namespace |
| 31 | 38 |
| 32 bool IsPinchToZoomEnabled() { | 39 bool IsPinchToZoomEnabled() { |
| 33 const base::CommandLine& command_line = | 40 const base::CommandLine& command_line = |
| 34 *base::CommandLine::ForCurrentProcess(); | 41 *base::CommandLine::ForCurrentProcess(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 return ProgressBarCompletion::DOM_CONTENT_LOADED; | 102 return ProgressBarCompletion::DOM_CONTENT_LOADED; |
| 96 if (progress_bar_completion == | 103 if (progress_bar_completion == |
| 97 "resourcesBeforeDOMContentLoadedAndSameOriginIframes") { | 104 "resourcesBeforeDOMContentLoadedAndSameOriginIframes") { |
| 98 return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES; | 105 return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES; |
| 99 } | 106 } |
| 100 #endif | 107 #endif |
| 101 return ProgressBarCompletion::LOAD_EVENT; | 108 return ProgressBarCompletion::LOAD_EVENT; |
| 102 } | 109 } |
| 103 | 110 |
| 104 } // namespace content | 111 } // namespace content |
| OLD | NEW |