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

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

Issue 1528373002: Replace Pass() with std::move in ui/ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add #include <utility> Created 5 years 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
« no previous file with comments | « no previous file | ui/ozone/platform/caca/caca_window_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
6
5 #include "base/at_exit.h" 7 #include "base/at_exit.h"
6 #include "base/command_line.h" 8 #include "base/command_line.h"
7 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 11 #include "base/run_loop.h"
10 #include "base/thread_task_runner_handle.h" 12 #include "base/thread_task_runner_handle.h"
11 #include "ui/display/types/display_snapshot.h" 13 #include "ui/display/types/display_snapshot.h"
12 #include "ui/display/types/native_display_delegate.h" 14 #include "ui/display/types/native_display_delegate.h"
13 #include "ui/display/types/native_display_observer.h" 15 #include "ui/display/types/native_display_observer.h"
14 #include "ui/events/event.h" 16 #include "ui/events/event.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 FROM_HERE, base::Bind(&WindowManager::OnConfigurationChanged, 306 FROM_HERE, base::Bind(&WindowManager::OnConfigurationChanged,
305 base::Unretained(this))); 307 base::Unretained(this)));
306 } 308 }
307 } 309 }
308 310
309 void WindowManager::OnDisplayConfigured(const gfx::Rect& bounds, bool success) { 311 void WindowManager::OnDisplayConfigured(const gfx::Rect& bounds, bool success) {
310 if (success) { 312 if (success) {
311 scoped_ptr<DemoWindow> window( 313 scoped_ptr<DemoWindow> window(
312 new DemoWindow(this, &renderer_factory_, bounds)); 314 new DemoWindow(this, &renderer_factory_, bounds));
313 window->Start(); 315 window->Start();
314 windows_.push_back(window.Pass()); 316 windows_.push_back(std::move(window));
315 } else { 317 } else {
316 LOG(ERROR) << "Failed to configure display at " << bounds.ToString(); 318 LOG(ERROR) << "Failed to configure display at " << bounds.ToString();
317 } 319 }
318 } 320 }
319 321
320 int main(int argc, char** argv) { 322 int main(int argc, char** argv) {
321 base::CommandLine::Init(argc, argv); 323 base::CommandLine::Init(argc, argv);
322 base::AtExitManager exit_manager; 324 base::AtExitManager exit_manager;
323 325
324 // Initialize logging so we can enable VLOG messages. 326 // Initialize logging so we can enable VLOG messages.
325 logging::LoggingSettings settings; 327 logging::LoggingSettings settings;
326 logging::InitLogging(settings); 328 logging::InitLogging(settings);
327 329
328 // Build UI thread message loop. This is used by platform 330 // Build UI thread message loop. This is used by platform
329 // implementations for event polling & running background tasks. 331 // implementations for event polling & running background tasks.
330 base::MessageLoopForUI message_loop; 332 base::MessageLoopForUI message_loop;
331 333
332 ui::OzonePlatform::InitializeForUI(); 334 ui::OzonePlatform::InitializeForUI();
333 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() 335 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
334 ->SetCurrentLayoutByName("us"); 336 ->SetCurrentLayoutByName("us");
335 337
336 base::RunLoop run_loop; 338 base::RunLoop run_loop;
337 339
338 WindowManager window_manager(run_loop.QuitClosure()); 340 WindowManager window_manager(run_loop.QuitClosure());
339 341
340 run_loop.Run(); 342 run_loop.Run();
341 343
342 return 0; 344 return 0;
343 } 345 }
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/caca/caca_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698