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

Side by Side Diff: ui/aura/test/ui_controls_factory_aurawin.cc

Issue 2375663002: Replace MessageLoop::current()->task_runner() with ThreadTaskRunnerHandle::Get(). (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | ui/ozone/platform/wayland/wayland_connection.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 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h"
9 #include "ui/aura/test/ui_controls_factory_aura.h" 10 #include "ui/aura/test/ui_controls_factory_aura.h"
10 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
11 #include "ui/aura/window_tree_host.h" 12 #include "ui/aura/window_tree_host.h"
12 #include "ui/base/test/ui_controls_aura.h" 13 #include "ui/base/test/ui_controls_aura.h"
13 #include "ui/base/test/ui_controls_internal_win.h" 14 #include "ui/base/test/ui_controls_internal_win.h"
14 15
15 namespace aura { 16 namespace aura {
16 namespace test { 17 namespace test {
17 18
18 namespace { 19 namespace {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int state, 71 int state,
71 const base::Closure& task) override { 72 const base::Closure& task) override {
72 return SendMouseEventsImpl(type, state, task); 73 return SendMouseEventsImpl(type, state, task);
73 } 74 }
74 bool SendMouseClick(MouseButton type) override { 75 bool SendMouseClick(MouseButton type) override {
75 return SendMouseEvents(type, UP | DOWN); 76 return SendMouseEvents(type, UP | DOWN);
76 } 77 }
77 void RunClosureAfterAllPendingUIEvents( 78 void RunClosureAfterAllPendingUIEvents(
78 const base::Closure& closure) override { 79 const base::Closure& closure) override {
79 // On windows, posting UI events is synchronous so just post the closure. 80 // On windows, posting UI events is synchronous so just post the closure.
80 base::MessageLoopForUI::current()->task_runner()->PostTask(FROM_HERE, 81 DCHECK(base::MessageLoopForUI::IsCurrent());
81 closure); 82 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
82 } 83 }
83 84
84 private: 85 private:
85 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); 86 DISALLOW_COPY_AND_ASSIGN(UIControlsWin);
86 }; 87 };
87 88
88 } // namespace 89 } // namespace
89 90
90 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { 91 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) {
91 return new UIControlsWin(); 92 return new UIControlsWin();
92 } 93 }
93 94
94 } // namespace test 95 } // namespace test
95 } // namespace aura 96 } // namespace aura
OLDNEW
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | ui/ozone/platform/wayland/wayland_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698