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

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

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 | « ui/aura/demo/demo_main.cc ('k') | ui/aura/window_event_dispatcher_unittest.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 "ui/aura/test/ui_controls_factory_aura.h" 9 #include "ui/aura/test/ui_controls_factory_aura.h"
9 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
10 #include "ui/aura/window_tree_host.h" 11 #include "ui/aura/window_tree_host.h"
11 #include "ui/base/test/ui_controls_aura.h" 12 #include "ui/base/test/ui_controls_aura.h"
12 #include "ui/base/test/ui_controls_internal_win.h" 13 #include "ui/base/test/ui_controls_internal_win.h"
13 14
14 namespace aura { 15 namespace aura {
15 namespace test { 16 namespace test {
16 17
17 namespace { 18 namespace {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 int state, 70 int state,
70 const base::Closure& task) override { 71 const base::Closure& task) override {
71 return SendMouseEventsImpl(type, state, task); 72 return SendMouseEventsImpl(type, state, task);
72 } 73 }
73 bool SendMouseClick(MouseButton type) override { 74 bool SendMouseClick(MouseButton type) override {
74 return SendMouseEvents(type, UP | DOWN); 75 return SendMouseEvents(type, UP | DOWN);
75 } 76 }
76 void RunClosureAfterAllPendingUIEvents( 77 void RunClosureAfterAllPendingUIEvents(
77 const base::Closure& closure) override { 78 const base::Closure& closure) override {
78 // On windows, posting UI events is synchronous so just post the closure. 79 // On windows, posting UI events is synchronous so just post the closure.
79 base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure); 80 base::MessageLoopForUI::current()->task_runner()->PostTask(FROM_HERE,
81 closure);
80 } 82 }
81 83
82 private: 84 private:
83 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); 85 DISALLOW_COPY_AND_ASSIGN(UIControlsWin);
84 }; 86 };
85 87
86 } // namespace 88 } // namespace
87 89
88 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { 90 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) {
89 return new UIControlsWin(); 91 return new UIControlsWin();
90 } 92 }
91 93
92 } // namespace test 94 } // namespace test
93 } // namespace aura 95 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698