1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h"
7 #include "base/auto_reset.h"
9 #include "base/run_loop.h"
13 DesktopDispatcherClient::DesktopDispatcherClient() {
16 DesktopDispatcherClient::~DesktopDispatcherClient() {
19 void DesktopDispatcherClient::PrepareNestedLoopClosures(
20 base::MessagePumpDispatcher
* dispatcher
,
21 base::Closure
* run_closure
,
22 base::Closure
* quit_closure
) {
24 scoped_ptr
<base::RunLoop
> run_loop(new base::RunLoop(dispatcher
));
26 scoped_ptr
<base::RunLoop
> run_loop(new base::RunLoop());
28 *quit_closure
= run_loop
->QuitClosure();
30 base::Bind(&base::RunLoop::Run
, base::Owned(run_loop
.release()));