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

Side by Side Diff: chrome/browser/chromeos/login/chrome_restart_request.cc

Issue 196473007: Add --disable-low-res-tiling. Disable low res tiling to save power. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve merge conflicts Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/chromeos/login/chrome_restart_request.h" 5 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // - Forward a given switches list to new command; 59 // - Forward a given switches list to new command;
60 // - Set start url if given; 60 // - Set start url if given;
61 // - Append/override switches using |new_switches|; 61 // - Append/override switches using |new_switches|;
62 std::string DeriveCommandLine(const GURL& start_url, 62 std::string DeriveCommandLine(const GURL& start_url,
63 const CommandLine& base_command_line, 63 const CommandLine& base_command_line,
64 const base::DictionaryValue& new_switches, 64 const base::DictionaryValue& new_switches,
65 CommandLine* command_line) { 65 CommandLine* command_line) {
66 DCHECK_NE(&base_command_line, command_line); 66 DCHECK_NE(&base_command_line, command_line);
67 67
68 static const char* kForwardSwitches[] = { 68 static const char* kForwardSwitches[] = {
69 ::switches::kDisableAccelerated2dCanvas, 69 ::switches::kDisableAccelerated2dCanvas,
70 ::switches::kDisableAcceleratedOverflowScroll, 70 ::switches::kDisableAcceleratedOverflowScroll,
71 ::switches::kDisableAcceleratedVideoDecode, 71 ::switches::kDisableAcceleratedVideoDecode,
72 ::switches::kDisableBrowserPluginCompositing, 72 ::switches::kDisableBrowserPluginCompositing,
73 ::switches::kDisableDelegatedRenderer, 73 ::switches::kDisableDelegatedRenderer,
74 ::switches::kDisableFiltersOverIPC, 74 ::switches::kDisableFiltersOverIPC,
75 ::switches::kDisableForceCompositingMode, 75 ::switches::kDisableForceCompositingMode,
76 ::switches::kDisableGpuShaderDiskCache, 76 ::switches::kDisableGpuShaderDiskCache,
77 ::switches::kDisableGpuWatchdog, 77 ::switches::kDisableGpuWatchdog,
78 ::switches::kDisableGpuCompositing, 78 ::switches::kDisableGpuCompositing,
79 ::switches::kDisableGpuRasterization, 79 ::switches::kDisableGpuRasterization,
80 ::switches::kDisableImplSidePainting, 80 ::switches::kDisableImplSidePainting,
81 ::switches::kDisableMapImage, 81 ::switches::kDisableLowResTiling,
82 ::switches::kDisablePrefixedEncryptedMedia, 82 ::switches::kDisableMapImage,
83 ::switches::kDisablePanelFitting, 83 ::switches::kDisablePrefixedEncryptedMedia,
84 ::switches::kDisableRepaintAfterLayout, 84 ::switches::kDisablePanelFitting,
85 ::switches::kDisableSeccompFilterSandbox, 85 ::switches::kDisableRepaintAfterLayout,
86 ::switches::kDisableSetuidSandbox, 86 ::switches::kDisableSeccompFilterSandbox,
87 ::switches::kDisableThreadedCompositing, 87 ::switches::kDisableSetuidSandbox,
88 ::switches::kDisableTouchDragDrop, 88 ::switches::kDisableThreadedCompositing,
89 ::switches::kDisableTouchEditing, 89 ::switches::kDisableTouchDragDrop,
90 ::switches::kDisableUniversalAcceleratedOverflowScroll, 90 ::switches::kDisableTouchEditing,
91 ::switches::kDisableUnprefixedMediaSource, 91 ::switches::kDisableUniversalAcceleratedOverflowScroll,
92 ::switches::kDisableWebKitMediaSource, 92 ::switches::kDisableUnprefixedMediaSource,
93 ::switches::kDisableAcceleratedFixedRootBackground, 93 ::switches::kDisableWebKitMediaSource,
94 ::switches::kEnableAcceleratedFixedRootBackground, 94 ::switches::kDisableAcceleratedFixedRootBackground,
95 ::switches::kEnableAcceleratedOverflowScroll, 95 ::switches::kEnableAcceleratedFixedRootBackground,
96 ::switches::kEnableBeginFrameScheduling, 96 ::switches::kEnableAcceleratedOverflowScroll,
97 ::switches::kEnableCompositingForFixedPosition, 97 ::switches::kEnableBeginFrameScheduling,
98 ::switches::kEnableDelegatedRenderer, 98 ::switches::kEnableCompositingForFixedPosition,
99 ::switches::kEnableEncryptedMedia, 99 ::switches::kEnableDelegatedRenderer,
100 ::switches::kEnableGestureTapHighlight, 100 ::switches::kEnableEncryptedMedia,
101 ::switches::kDisableGestureTapHighlight, 101 ::switches::kEnableGestureTapHighlight,
102 ::switches::kDisableGpuSandbox, 102 ::switches::kDisableGestureTapHighlight,
103 ::switches::kEnableDeferredFilters, 103 ::switches::kDisableGpuSandbox,
104 ::switches::kEnableGpuRasterization, 104 ::switches::kEnableDeferredFilters,
105 ::switches::kEnableImplSidePainting, 105 ::switches::kEnableGpuRasterization,
106 ::switches::kEnableLogging, 106 ::switches::kEnableImplSidePainting,
107 ::switches::kEnableMapImage, 107 ::switches::kEnableLogging,
108 ::switches::kEnablePinch, 108 ::switches::kEnableLowResTiling,
109 ::switches::kEnableRepaintAfterLayout, 109 ::switches::kEnableMapImage,
110 ::switches::kEnableThreadedCompositing, 110 ::switches::kEnablePinch,
111 ::switches::kEnableTouchDragDrop, 111 ::switches::kEnableRepaintAfterLayout,
112 ::switches::kEnableTouchEditing, 112 ::switches::kEnableThreadedCompositing,
113 ::switches::kEnableUniversalAcceleratedOverflowScroll, 113 ::switches::kEnableTouchDragDrop,
114 ::switches::kEnableViewport, 114 ::switches::kEnableTouchEditing,
115 ::switches::kEnableViewportMeta, 115 ::switches::kEnableUniversalAcceleratedOverflowScroll,
116 ::switches::kMainFrameResizesAreOrientationChanges, 116 ::switches::kEnableViewport,
117 ::switches::kForceDeviceScaleFactor, 117 ::switches::kEnableViewportMeta,
118 ::switches::kForceGpuRasterization, 118 ::switches::kMainFrameResizesAreOrientationChanges,
119 ::switches::kGpuStartupDialog, 119 ::switches::kForceDeviceScaleFactor,
120 ::switches::kGpuSandboxAllowSysVShm, 120 ::switches::kForceGpuRasterization,
121 ::switches::kGpuSandboxFailuresFatal, 121 ::switches::kGpuStartupDialog,
122 ::switches::kMultiProfiles, 122 ::switches::kGpuSandboxAllowSysVShm,
123 ::switches::kNoSandbox, 123 ::switches::kGpuSandboxFailuresFatal,
124 ::switches::kNumRasterThreads, 124 ::switches::kMultiProfiles,
125 ::switches::kPpapiFlashArgs, 125 ::switches::kNoSandbox,
126 ::switches::kPpapiFlashPath, 126 ::switches::kNumRasterThreads,
127 ::switches::kPpapiFlashVersion, 127 ::switches::kPpapiFlashArgs,
128 ::switches::kPpapiInProcess, 128 ::switches::kPpapiFlashPath,
129 ::switches::kRendererStartupDialog, 129 ::switches::kPpapiFlashVersion,
130 ::switches::kEnableShareGroupAsyncTextureUpload, 130 ::switches::kPpapiInProcess,
131 ::switches::kTabCaptureUpscaleQuality, 131 ::switches::kRendererStartupDialog,
132 ::switches::kTabCaptureDownscaleQuality, 132 ::switches::kEnableShareGroupAsyncTextureUpload,
133 ::switches::kTabCaptureUpscaleQuality,
134 ::switches::kTabCaptureDownscaleQuality,
133 #if defined(USE_XI2_MT) 135 #if defined(USE_XI2_MT)
134 ::switches::kTouchCalibration, 136 ::switches::kTouchCalibration,
135 #endif 137 #endif
136 ::switches::kTouchDevices, 138 ::switches::kTouchDevices,
137 ::switches::kTouchEvents, 139 ::switches::kTouchEvents,
138 ::switches::kTouchOptimizedUI, 140 ::switches::kTouchOptimizedUI,
139 ::switches::kUIDisableThreadedCompositing, 141 ::switches::kUIDisableThreadedCompositing,
140 ::switches::kUIPrioritizeInGpuProcess, 142 ::switches::kUIPrioritizeInGpuProcess,
141 #if defined(USE_CRAS) 143 #if defined(USE_CRAS)
142 ::switches::kUseCras, 144 ::switches::kUseCras,
143 #endif 145 #endif
144 ::switches::kUseDiscardableMemory, 146 ::switches::kUseDiscardableMemory,
145 ::switches::kUseGL, 147 ::switches::kUseGL,
146 ::switches::kUserDataDir, 148 ::switches::kUserDataDir,
147 ::switches::kV, 149 ::switches::kV,
148 ::switches::kVModule, 150 ::switches::kVModule,
149 ::switches::kWebGLCommandBufferSizeKb, 151 ::switches::kWebGLCommandBufferSizeKb,
150 ::switches::kEnableWebGLDraftExtensions, 152 ::switches::kEnableWebGLDraftExtensions,
151 #if defined(ENABLE_WEBRTC) 153 #if defined(ENABLE_WEBRTC)
152 ::switches::kDisableWebRtcHWDecoding, 154 ::switches::kDisableWebRtcHWDecoding,
153 ::switches::kDisableWebRtcHWEncoding, 155 ::switches::kDisableWebRtcHWEncoding,
154 ::switches::kEnableAudioTrackProcessing, 156 ::switches::kEnableAudioTrackProcessing,
155 ::switches::kEnableWebRtcHWVp8Encoding, 157 ::switches::kEnableWebRtcHWVp8Encoding,
156 #endif 158 #endif
157 ash::switches::kAshDefaultWallpaperLarge, 159 ash::switches::kAshDefaultWallpaperLarge,
158 ash::switches::kAshDefaultWallpaperSmall, 160 ash::switches::kAshDefaultWallpaperSmall,
159 ash::switches::kAshGuestWallpaperLarge, 161 ash::switches::kAshGuestWallpaperLarge,
160 ash::switches::kAshGuestWallpaperSmall, 162 ash::switches::kAshGuestWallpaperSmall,
161 ash::switches::kAshHostWindowBounds, 163 ash::switches::kAshHostWindowBounds,
162 ash::switches::kAshTouchHud, 164 ash::switches::kAshTouchHud,
163 ash::switches::kAuraLegacyPowerButton, 165 ash::switches::kAuraLegacyPowerButton,
164 // Please keep these in alphabetical order. Non-UI Compositor switches 166 // Please keep these in alphabetical order. Non-UI Compositor switches
165 // here should also be added to 167 // here should also be added to
166 // content/browser/renderer_host/render_process_host_impl.cc. 168 // content/browser/renderer_host/render_process_host_impl.cc.
167 cc::switches::kCompositeToMailbox, 169 cc::switches::kCompositeToMailbox,
168 cc::switches::kDisableCompositedAntialiasing, 170 cc::switches::kDisableCompositedAntialiasing,
169 cc::switches::kDisableCompositorTouchHitTesting, 171 cc::switches::kDisableCompositorTouchHitTesting,
170 cc::switches::kDisableMainFrameBeforeActivation, 172 cc::switches::kDisableMainFrameBeforeActivation,
171 cc::switches::kDisableMainFrameBeforeDraw, 173 cc::switches::kDisableMainFrameBeforeDraw,
172 cc::switches::kDisableThreadedAnimation, 174 cc::switches::kDisableThreadedAnimation,
173 cc::switches::kEnableGpuBenchmarking, 175 cc::switches::kEnableGpuBenchmarking,
174 cc::switches::kEnablePinchVirtualViewport, 176 cc::switches::kEnablePinchVirtualViewport,
175 cc::switches::kEnableMainFrameBeforeActivation, 177 cc::switches::kEnableMainFrameBeforeActivation,
176 cc::switches::kEnableTopControlsPositionCalculation, 178 cc::switches::kEnableTopControlsPositionCalculation,
177 cc::switches::kMaxTilesForInterestArea, 179 cc::switches::kMaxTilesForInterestArea,
178 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, 180 cc::switches::kMaxUnusedResourceMemoryUsagePercentage,
179 cc::switches::kShowCompositedLayerBorders, 181 cc::switches::kShowCompositedLayerBorders,
180 cc::switches::kShowFPSCounter, 182 cc::switches::kShowFPSCounter,
181 cc::switches::kShowLayerAnimationBounds, 183 cc::switches::kShowLayerAnimationBounds,
182 cc::switches::kShowNonOccludingRects, 184 cc::switches::kShowNonOccludingRects,
183 cc::switches::kShowOccludingRects, 185 cc::switches::kShowOccludingRects,
184 cc::switches::kShowPropertyChangedRects, 186 cc::switches::kShowPropertyChangedRects,
185 cc::switches::kShowReplicaScreenSpaceRects, 187 cc::switches::kShowReplicaScreenSpaceRects,
186 cc::switches::kShowScreenSpaceRects, 188 cc::switches::kShowScreenSpaceRects,
187 cc::switches::kShowSurfaceDamageRects, 189 cc::switches::kShowSurfaceDamageRects,
188 cc::switches::kSlowDownRasterScaleFactor, 190 cc::switches::kSlowDownRasterScaleFactor,
189 cc::switches::kUIDisablePartialSwap, 191 cc::switches::kUIDisablePartialSwap,
190 chromeos::switches::kDbusStub, 192 chromeos::switches::kDbusStub,
191 chromeos::switches::kDisableLoginAnimations, 193 chromeos::switches::kDisableLoginAnimations,
192 chromeos::switches::kHasChromeOSDiamondKey, 194 chromeos::switches::kHasChromeOSDiamondKey,
193 chromeos::switches::kHasChromeOSKeyboard, 195 chromeos::switches::kHasChromeOSKeyboard,
194 chromeos::switches::kLoginProfile, 196 chromeos::switches::kLoginProfile,
195 chromeos::switches::kNaturalScrollDefault, 197 chromeos::switches::kNaturalScrollDefault,
196 ::switches::kEnableBrowserTextSubpixelPositioning, 198 ::switches::kEnableBrowserTextSubpixelPositioning,
197 ::switches::kEnableWebkitTextSubpixelPositioning, 199 ::switches::kEnableWebkitTextSubpixelPositioning,
198 policy::switches::kDeviceManagementUrl, 200 policy::switches::kDeviceManagementUrl,
199 wm::switches::kWindowAnimationsDisabled, 201 wm::switches::kWindowAnimationsDisabled,
200 }; 202 };
201 command_line->CopySwitchesFrom(base_command_line, 203 command_line->CopySwitchesFrom(base_command_line,
202 kForwardSwitches, 204 kForwardSwitches,
203 arraysize(kForwardSwitches)); 205 arraysize(kForwardSwitches));
204 206
205 if (start_url.is_valid()) 207 if (start_url.is_valid())
206 command_line->AppendArg(start_url.spec()); 208 command_line->AppendArg(start_url.spec());
207 209
208 for (base::DictionaryValue::Iterator it(new_switches); 210 for (base::DictionaryValue::Iterator it(new_switches);
209 !it.IsAtEnd(); 211 !it.IsAtEnd();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Relaunch chrome without session manager on dev box. 353 // Relaunch chrome without session manager on dev box.
352 ReLaunch(command_line); 354 ReLaunch(command_line);
353 return; 355 return;
354 } 356 }
355 357
356 // ChromeRestartRequest deletes itself after request sent to session manager. 358 // ChromeRestartRequest deletes itself after request sent to session manager.
357 (new ChromeRestartRequest(command_line))->Start(); 359 (new ChromeRestartRequest(command_line))->Start();
358 } 360 }
359 361
360 } // namespace chromeos 362 } // namespace chromeos
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698