OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" | 5 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "build/build_config.h" |
10 | 11 |
11 namespace views { | 12 namespace views { |
12 | 13 |
13 DesktopDispatcherClient::DesktopDispatcherClient() { | 14 DesktopDispatcherClient::DesktopDispatcherClient() { |
14 } | 15 } |
15 | 16 |
16 DesktopDispatcherClient::~DesktopDispatcherClient() { | 17 DesktopDispatcherClient::~DesktopDispatcherClient() { |
17 } | 18 } |
18 | 19 |
19 void DesktopDispatcherClient::PrepareNestedLoopClosures( | 20 void DesktopDispatcherClient::PrepareNestedLoopClosures( |
20 base::MessagePumpDispatcher* dispatcher, | 21 base::MessagePumpDispatcher* dispatcher, |
21 base::Closure* run_closure, | 22 base::Closure* run_closure, |
22 base::Closure* quit_closure) { | 23 base::Closure* quit_closure) { |
23 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
24 scoped_ptr<base::RunLoop> run_loop(new base::RunLoop(dispatcher)); | 25 scoped_ptr<base::RunLoop> run_loop(new base::RunLoop(dispatcher)); |
25 #else | 26 #else |
26 scoped_ptr<base::RunLoop> run_loop(new base::RunLoop()); | 27 scoped_ptr<base::RunLoop> run_loop(new base::RunLoop()); |
27 #endif | 28 #endif |
28 *quit_closure = run_loop->QuitClosure(); | 29 *quit_closure = run_loop->QuitClosure(); |
29 *run_closure = | 30 *run_closure = |
30 base::Bind(&base::RunLoop::Run, base::Owned(run_loop.release())); | 31 base::Bind(&base::RunLoop::Run, base::Owned(run_loop.release())); |
31 } | 32 } |
32 | 33 |
33 } // namespace views | 34 } // namespace views |
OLD | NEW |