| 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/feature_list.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 bool IsPinchToZoomEnabled() { | 41 bool IsPinchToZoomEnabled() { |
| 42 const base::CommandLine& command_line = | 42 const base::CommandLine& command_line = |
| 43 *base::CommandLine::ForCurrentProcess(); | 43 *base::CommandLine::ForCurrentProcess(); |
| 44 | 44 |
| 45 // Enable pinch everywhere unless it's been explicitly disabled. | 45 // Enable pinch everywhere unless it's been explicitly disabled. |
| 46 return !command_line.HasSwitch(switches::kDisablePinch); | 46 return !command_line.HasSwitch(switches::kDisablePinch); |
| 47 } | 47 } |
| 48 | 48 |
| 49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
| 50 | 50 |
| 51 bool IsWin32kRendererLockdownEnabled() { | 51 bool IsWin32kLockdownEnabled() { |
| 52 if (base::win::GetVersion() < base::win::VERSION_WIN8) | 52 if (base::win::GetVersion() < base::win::VERSION_WIN8) |
| 53 return false; | 53 return false; |
| 54 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 54 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 55 if (cmd_line->HasSwitch(switches::kDisableWin32kRendererLockDown)) | 55 if (cmd_line->HasSwitch(switches::kDisableWin32kLockDown)) |
| 56 return false; | 56 return false; |
| 57 return true; | 57 return true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 V8CacheOptions GetV8CacheOptions() { | 62 V8CacheOptions GetV8CacheOptions() { |
| 63 const base::CommandLine& command_line = | 63 const base::CommandLine& command_line = |
| 64 *base::CommandLine::ForCurrentProcess(); | 64 *base::CommandLine::ForCurrentProcess(); |
| 65 std::string v8_cache_options = | 65 std::string v8_cache_options = |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 return ProgressBarCompletion::DOM_CONTENT_LOADED; | 104 return ProgressBarCompletion::DOM_CONTENT_LOADED; |
| 105 if (progress_bar_completion == | 105 if (progress_bar_completion == |
| 106 "resourcesBeforeDOMContentLoadedAndSameOriginIframes") { | 106 "resourcesBeforeDOMContentLoadedAndSameOriginIframes") { |
| 107 return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES; | 107 return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES; |
| 108 } | 108 } |
| 109 #endif | 109 #endif |
| 110 return ProgressBarCompletion::LOAD_EVENT; | 110 return ProgressBarCompletion::LOAD_EVENT; |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace content | 113 } // namespace content |
| OLD | NEW |