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

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

Issue 2769123002: Remove InitializeForUI() from OzonePlatform (Closed)
Patch Set: 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 // Initialize logging so we can enable VLOG messages. 333 // Initialize logging so we can enable VLOG messages.
334 logging::LoggingSettings settings; 334 logging::LoggingSettings settings;
335 logging::InitLogging(settings); 335 logging::InitLogging(settings);
336 336
337 // Build UI thread message loop. This is used by platform 337 // Build UI thread message loop. This is used by platform
338 // implementations for event polling & running background tasks. 338 // implementations for event polling & running background tasks.
339 base::MessageLoopForUI message_loop; 339 base::MessageLoopForUI message_loop;
340 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("OzoneDemo"); 340 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("OzoneDemo");
341 341
342 ui::OzonePlatform::InitializeForUI(); 342 ui::OzonePlatform::InitParams params;
tonikitoo 2017/03/23 11:55:18 This used to implicitly call "ui::OzonePlatform::I
Chandan 2017/03/23 12:13:16 Generally, we set single_process to true for tests
fwang 2017/03/23 13:34:11 I would personally keep the current behavior, unle
Chandan 2017/03/27 11:06:40 Acknowledged.
343 params.single_process = true;
344 ui::OzonePlatform::InitializeForUI(params);
345
343 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() 346 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
344 ->SetCurrentLayoutByName("us"); 347 ->SetCurrentLayoutByName("us");
345 348
346 base::RunLoop run_loop; 349 base::RunLoop run_loop;
347 350
348 WindowManager window_manager(run_loop.QuitClosure()); 351 WindowManager window_manager(run_loop.QuitClosure());
349 352
350 run_loop.Run(); 353 run_loop.Run();
351 354
352 return 0; 355 return 0;
353 } 356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698