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

Side by Side Diff: ui/aura/bench/bench_main.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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
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 #if defined(USE_X11) 5 #if defined(USE_X11)
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 #endif 7 #endif
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 compositor_(compositor), 163 compositor_(compositor),
164 fbo_(0), 164 fbo_(0),
165 do_draw_(true) { 165 do_draw_(true) {
166 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 166 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
167 do_draw_ = !command_line->HasSwitch("disable-draw"); 167 do_draw_ = !command_line->HasSwitch("disable-draw");
168 168
169 std::string webgl_size = command_line->GetSwitchValueASCII("webgl-size"); 169 std::string webgl_size = command_line->GetSwitchValueASCII("webgl-size");
170 int width = 0; 170 int width = 0;
171 int height = 0; 171 int height = 0;
172 if (!webgl_size.empty()) { 172 if (!webgl_size.empty()) {
173 std::vector<std::string> split_size; 173 std::vector<std::string> split_size = base::SplitString(
174 base::SplitString(webgl_size, 'x', &split_size); 174 webgl_size, "x", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
175 if (split_size.size() == 2) { 175 if (split_size.size() == 2) {
176 width = atoi(split_size[0].c_str()); 176 width = atoi(split_size[0].c_str());
177 height = atoi(split_size[1].c_str()); 177 height = atoi(split_size[1].c_str());
178 } 178 }
179 } 179 }
180 if (!width || !height) { 180 if (!width || !height) {
181 width = 800; 181 width = 800;
182 height = 600; 182 height = 600;
183 } 183 }
184 gfx::Rect bounds(width, height); 184 gfx::Rect bounds(width, height);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); 365 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100));
366 #endif 366 #endif
367 367
368 host->Show(); 368 host->Show();
369 base::MessageLoopForUI::current()->Run(); 369 base::MessageLoopForUI::current()->Run();
370 focus_client.reset(); 370 focus_client.reset();
371 host.reset(); 371 host.reset();
372 372
373 return 0; 373 return 0;
374 } 374 }
OLDNEW
« no previous file with comments | « remoting/protocol/negotiating_host_authenticator.cc ('k') | ui/base/ime/input_method_auralinux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698