|
|
Remove use of deprecated MessageLoop methods in ui.
MessageLoop::PostTask/PostDelayedTask/DeleteSoon/ReleaseSoon
are deprecated. This CL makes the following replacements to
remove some uses of these methods:
"MessageLoop::current()->PostTask" ->
"ThreadTaskRunnerHandle::Get()->PostTask"
"MessageLoop::current()->PostDelayedTask" ->
"ThreadTaskRunnerHandle::Get()->PostDelayedTask"
"MessageLoop::current()->DeleteSoon" ->
"ThreadTaskRunnerHandle::Get()->DeleteSoon"
"MessageLoop::current()->ReleaseSoon" ->
"ThreadTaskRunnerHandle::Get()->ReleaseSoon"
In files where these replacements are made, it adds these includes:
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
And removes this include if it is no longer required:
#include "base/message_loop/message_loop.h"
Why ThreadTaskRunnerHandle::Get() instead of
MessageLoop::current()->task_runner()?
- The two are equivalent on threads that run a MessageLoop.
- MessageLoop::current() doesn't work in base/task_scheduler
because the scheduler's thread don't run MessageLoops.
This CL will therefore facilitate the migration of browser
threads to base/task_scheduler.
Steps to generate this patch:
1. Run message_loop_cleanup.py (see code on the bug).
2. Run tools/sort-headers.py on modified files.
3. Run git cl format.
BUG= 616447
R=thakis@chromium.org
Committed: https://crrev.com/1649dd33113be7fe5626a058a3cb0143a02849d2
Cr-Commit-Position: refs/heads/master@{#399705}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+163 lines, -129 lines) |
Patch |
 |
M |
ui/app_list/views/search_result_container_view.cc
|
View
|
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/aura/gestures/gesture_recognizer_unittest.cc
|
View
|
1
|
3 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ui/aura/test/ui_controls_factory_ozone.cc
|
View
|
|
4 chunks |
+8 lines, -9 lines |
0 comments
|
Download
|
 |
M |
ui/base/ime/chromeos/ime_keyboard_x11.cc
|
View
|
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/base/models/simple_menu_model.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/base/test/ui_controls_internal_win.cc
|
View
|
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/base/win/osk_display_manager.cc
|
View
|
|
5 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/base/x/x11_util.cc
|
View
|
|
3 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/display/chromeos/test/test_native_display_delegate.cc
|
View
|
|
3 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/events/gesture_detection/gesture_provider_unittest.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/events/test/platform_event_waiter.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_cgl.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/keyboard/keyboard_controller.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/message_center/message_center_impl_unittest.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/message_center/views/message_bubble_base.cc
|
View
|
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/message_center/views/message_list_view.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/caca/caca_window.cc
|
View
|
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/shell_dialogs/select_file_dialog.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/views/mouse_watcher.cc
|
View
|
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc
|
View
|
|
10 chunks |
+24 lines, -31 lines |
0 comments
|
Download
|
 |
M |
ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
View
|
1
|
3 chunks |
+9 lines, -7 lines |
0 comments
|
Download
|
 |
M |
ui/views/widget/native_widget_aura.cc
|
View
|
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/views/widget/widget_interactive_uitest.cc
|
View
|
1
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/views/win/hwnd_message_handler.cc
|
View
|
1
|
7 chunks |
+17 lines, -19 lines |
0 comments
|
Download
|
Total messages: 11 (5 generated)
|