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

Side by Side Diff: ui/ozone/demo/ozone_demo.cc

Issue 2729523006: Remove the |max_threads| argument from CreateAndSetSimpleTaskScheduler(). (Closed)
Patch Set: self-review Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 <utility> 5 #include <utility>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 base::CommandLine::Init(argc, argv); 331 base::CommandLine::Init(argc, argv);
332 base::AtExitManager exit_manager; 332 base::AtExitManager exit_manager;
333 333
334 // Initialize logging so we can enable VLOG messages. 334 // Initialize logging so we can enable VLOG messages.
335 logging::LoggingSettings settings; 335 logging::LoggingSettings settings;
336 logging::InitLogging(settings); 336 logging::InitLogging(settings);
337 337
338 // Build UI thread message loop. This is used by platform 338 // Build UI thread message loop. This is used by platform
339 // implementations for event polling & running background tasks. 339 // implementations for event polling & running background tasks.
340 base::MessageLoopForUI message_loop; 340 base::MessageLoopForUI message_loop;
341 constexpr int kMaxTaskSchedulerThreads = 3; 341 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("OzoneDemo");
342 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(
343 kMaxTaskSchedulerThreads);
344 342
345 ui::OzonePlatform::InitializeForUI(); 343 ui::OzonePlatform::InitializeForUI();
346 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() 344 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
347 ->SetCurrentLayoutByName("us"); 345 ->SetCurrentLayoutByName("us");
348 346
349 base::RunLoop run_loop; 347 base::RunLoop run_loop;
350 348
351 WindowManager window_manager(run_loop.QuitClosure()); 349 WindowManager window_manager(run_loop.QuitClosure());
352 350
353 run_loop.Run(); 351 run_loop.Run();
354 352
355 return 0; 353 return 0;
356 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698