Commit c92fdcdd authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::ScopedNestableTaskAllower to RunLoop::Type::kNestableTasksAllowed in /ui/aura

This is another scripted pass done by a slightly modified version of
https://bugs.chromium.org/p/chromium/issues/detail?id=781352#c1 which
has a better notion of "scope".

The script should have replaced a MessageLoop::ScopedNestableTaskAllower
in the same scope as a RunLoop with a RunLoop of
Type::kNestableTasksAllowed.

Includes should have been stripped if that was the last usage of message_loop.h
in that file.

Please CQ if LGTY

This CL was uploaded by git cl split.

R=sky@chromium.org

Bug: 781352
Change-Id: Ide6e641f8e9fed673bbf641074f33a05d238735a
Reviewed-on: https://chromium-review.googlesource.com/1014782Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551508}
parent 9c3c8fb6
......@@ -9,7 +9,6 @@
#include <vector>
#include "base/auto_reset.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "mojo/public/cpp/bindings/map.h"
#include "services/ui/public/interfaces/window_tree.mojom.h"
......@@ -137,7 +136,7 @@ int DragDropControllerMus::StartDragAndDrop(
ui::DragDropTypes::DragEventSource source) {
DCHECK(!current_drag_state_);
base::RunLoop run_loop;
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
WindowMus* root_window_mus = WindowMus::Get(root_window);
const uint32_t change_id =
drag_drop_controller_host_->CreateChangeIdForDrag(root_window_mus);
......@@ -149,9 +148,6 @@ int DragDropControllerMus::StartDragAndDrop(
// run_loop.Run() quits.
current_drag_state_ = &current_drag_state;
base::MessageLoop* loop = base::MessageLoop::current();
base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
ui::mojom::PointerKind mojo_source = ui::mojom::PointerKind::MOUSE;
if (source != ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE) {
// TODO(erg): This collapses both touch and pen events to touch.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment