blob: d9a33cfdf1e08b3efddf0cdce0530cdb60dd28b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/aura/desktop/desktop_dispatcher_client.h"
namespace aura {
DesktopDispatcherClient::DesktopDispatcherClient() {}
DesktopDispatcherClient::~DesktopDispatcherClient() {}
void DesktopDispatcherClient::RunWithDispatcher(
MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window,
bool nestable_tasks_allowed) {
// TODO(erg): This class has been copypastad from
// ash/accelerators/nested_dispatcher_controller.cc. I have left my changes
// commented out because I don't entirely understand the implications of the
// change.
MessageLoopForUI* loop = MessageLoopForUI::current();
bool did_allow_task_nesting = loop->NestableTasksAllowed();
loop->SetNestableTasksAllowed(nestable_tasks_allowed);
// DefaultAcceleratorDispatcher dispatcher(nested_dispatcher,
// associated_window);
loop->RunWithDispatcher(nested_dispatcher);
loop->SetNestableTasksAllowed(did_allow_task_nesting);
}
} // namespace aura
|