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

Side by Side Diff: content/browser/android/content_startup_flags.cc

Issue 1175703002: [Android] Conditionally enable M text selection features (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years, 6 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
« 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 "content/browser/android/content_startup_flags.h" 5 #include "content/browser/android/content_startup_flags.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 parsed_command_line->AppendSwitch(switches::kSingleProcess); 56 parsed_command_line->AppendSwitch(switches::kSingleProcess);
57 } 57 }
58 58
59 parsed_command_line->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); 59 parsed_command_line->AppendSwitch(cc::switches::kEnableBeginFrameScheduling);
60 60
61 parsed_command_line->AppendSwitch(switches::kEnablePinch); 61 parsed_command_line->AppendSwitch(switches::kEnablePinch);
62 parsed_command_line->AppendSwitch(switches::kEnableOverlayFullscreenVideo); 62 parsed_command_line->AppendSwitch(switches::kEnableOverlayFullscreenVideo);
63 parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar); 63 parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar);
64 parsed_command_line->AppendSwitch(switches::kValidateInputEventStream); 64 parsed_command_line->AppendSwitch(switches::kValidateInputEventStream);
65 65
66 // TODO(jdduke): Use the proper SDK version when available, crbug.com/466749.
67 if (base::android::BuildInfo::GetInstance()->sdk_int() >
68 base::android::SDK_VERSION_LOLLIPOP_MR1) {
69 parsed_command_line->AppendSwitch(switches::kEnableLongpressDragSelection);
70 parsed_command_line->AppendSwitchASCII(
71 switches::kTouchTextSelectionStrategy, "direction");
72 }
73
66 // There is no software fallback on Android, so don't limit GPU crashes. 74 // There is no software fallback on Android, so don't limit GPU crashes.
67 parsed_command_line->AppendSwitch(switches::kDisableGpuProcessCrashLimit); 75 parsed_command_line->AppendSwitch(switches::kDisableGpuProcessCrashLimit);
68 76
69 // On legacy low-memory devices the behavior has not been studied with regard 77 // On legacy low-memory devices the behavior has not been studied with regard
70 // to having an extra process with similar priority as the foreground renderer 78 // to having an extra process with similar priority as the foreground renderer
71 // and given that the system will often be looking for a process to be killed 79 // and given that the system will often be looking for a process to be killed
72 // on such systems. 80 // on such systems.
73 if (base::SysInfo::IsLowEndDevice()) 81 if (base::SysInfo::IsLowEndDevice())
74 parsed_command_line->AppendSwitch(switches::kInProcessGPU); 82 parsed_command_line->AppendSwitch(switches::kInProcessGPU);
75 83
(...skipping 21 matching lines...) Expand all
97 } 105 }
98 106
99 cc::LayerSettings layer_settings; 107 cc::LayerSettings layer_settings;
100 if (parsed_command_line->HasSwitch( 108 if (parsed_command_line->HasSwitch(
101 switches::kEnableAndroidCompositorAnimationTimelines)) 109 switches::kEnableAndroidCompositorAnimationTimelines))
102 layer_settings.use_compositor_animation_timelines = true; 110 layer_settings.use_compositor_animation_timelines = true;
103 Compositor::SetLayerSettings(layer_settings); 111 Compositor::SetLayerSettings(layer_settings);
104 } 112 }
105 113
106 } // namespace content 114 } // namespace content
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