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

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

Issue 17550008: Make IsSolidColor() a property on CC scrollbar layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Jochen's comments. Created 7 years, 5 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 "content/browser/android/content_startup_flags.h" 5 #include "content/browser/android/content_startup_flags.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
11 #include "content/public/browser/render_process_host.h" 11 #include "content/public/browser/render_process_host.h"
12 #include "content/public/common/content_constants.h" 12 #include "content/public/common/content_constants.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 #include "gpu/command_buffer/service/gpu_switches.h" 14 #include "gpu/command_buffer/service/gpu_switches.h"
15 #include "ui/base/ui_base_switches.h" 15 #include "ui/base/ui_base_switches.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 namespace {
20 const char kSolidColorScrollbarThicknessValue[] = "=3";
21 const char kSolidColorScrollbarColorValue[] = "=0x80808080";
22 } // namespace
23
19 void SetContentCommandLineFlags(int max_render_process_count, 24 void SetContentCommandLineFlags(int max_render_process_count,
20 const std::string& plugin_descriptor) { 25 const std::string& plugin_descriptor) {
21 // May be called multiple times, to cover all possible program entry points. 26 // May be called multiple times, to cover all possible program entry points.
22 static bool already_initialized = false; 27 static bool already_initialized = false;
23 if (already_initialized) 28 if (already_initialized)
24 return; 29 return;
25 already_initialized = true; 30 already_initialized = true;
26 31
27 CommandLine* parsed_command_line = CommandLine::ForCurrentProcess(); 32 CommandLine* parsed_command_line = CommandLine::ForCurrentProcess();
28 33
(...skipping 25 matching lines...) Expand all
54 switches::kEnableCompositingForFixedPosition); 59 switches::kEnableCompositingForFixedPosition);
55 parsed_command_line->AppendSwitch(switches::kEnableAcceleratedOverflowScroll); 60 parsed_command_line->AppendSwitch(switches::kEnableAcceleratedOverflowScroll);
56 parsed_command_line->AppendSwitch( 61 parsed_command_line->AppendSwitch(
57 switches::kEnableAcceleratedScrollableFrames); 62 switches::kEnableAcceleratedScrollableFrames);
58 parsed_command_line->AppendSwitch( 63 parsed_command_line->AppendSwitch(
59 switches::kEnableCompositedScrollingForFrames); 64 switches::kEnableCompositedScrollingForFrames);
60 65
61 parsed_command_line->AppendSwitch(switches::kEnableGestureTapHighlight); 66 parsed_command_line->AppendSwitch(switches::kEnableGestureTapHighlight);
62 parsed_command_line->AppendSwitch(switches::kEnablePinch); 67 parsed_command_line->AppendSwitch(switches::kEnablePinch);
63 parsed_command_line->AppendSwitch(switches::kEnableOverscrollNotifications); 68 parsed_command_line->AppendSwitch(switches::kEnableOverscrollNotifications);
69 parsed_command_line->AppendSwitch(cc::switches::kForceSolidColorScrollbars);
70
71 std::string thickness_string(cc::switches::kSolidColorScrollbarThickness);
72 thickness_string.append(kSolidColorScrollbarThicknessValue);
73 parsed_command_line->AppendSwitch(thickness_string);
74
75 std::string color_string(cc::switches::kSolidColorScrollbarColor);
76 color_string.append(kSolidColorScrollbarColorValue);
77 parsed_command_line->AppendSwitch(color_string);
64 78
65 // Run the GPU service as a thread in the browser instead of as a 79 // Run the GPU service as a thread in the browser instead of as a
66 // standalone process. 80 // standalone process.
67 parsed_command_line->AppendSwitch(switches::kInProcessGPU); 81 parsed_command_line->AppendSwitch(switches::kInProcessGPU);
68 parsed_command_line->AppendSwitch(switches::kDisableGpuShaderDiskCache); 82 parsed_command_line->AppendSwitch(switches::kDisableGpuShaderDiskCache);
69 83
70 // Always use fixed layout and viewport tag. 84 // Always use fixed layout and viewport tag.
71 parsed_command_line->AppendSwitch(switches::kEnableFixedLayout); 85 parsed_command_line->AppendSwitch(switches::kEnableFixedLayout);
72 parsed_command_line->AppendSwitch(switches::kEnableViewport); 86 parsed_command_line->AppendSwitch(switches::kEnableViewport);
73 87
74 if (!plugin_descriptor.empty()) { 88 if (!plugin_descriptor.empty()) {
75 parsed_command_line->AppendSwitchNative( 89 parsed_command_line->AppendSwitchNative(
76 switches::kRegisterPepperPlugins, plugin_descriptor); 90 switches::kRegisterPepperPlugins, plugin_descriptor);
77 } 91 }
78 } 92 }
79 93
80 } // namespace content 94 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698