OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_FRAME_TASK_MARSHALLER_H_ | 5 #ifndef CHROME_FRAME_TASK_MARSHALLER_H_ |
6 #define CHROME_FRAME_TASK_MARSHALLER_H_ | 6 #define CHROME_FRAME_TASK_MARSHALLER_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <deque> | 9 #include <deque> |
10 #include <queue> | 10 #include <queue> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/pending_task.h" | 13 #include "base/pending_task.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
16 #include "base/time.h" | 16 #include "base/time/time.h" |
17 | 17 |
18 class Task; | 18 class Task; |
19 | 19 |
20 namespace tracked_objects { | 20 namespace tracked_objects { |
21 class Location; | 21 class Location; |
22 } | 22 } |
23 | 23 |
24 // TaskMarshallerThroughMessageQueue is similar to base::MessageLoopForUI | 24 // TaskMarshallerThroughMessageQueue is similar to base::MessageLoopForUI |
25 // in cases where we do not control the thread lifetime and message retrieval | 25 // in cases where we do not control the thread lifetime and message retrieval |
26 // and dispatching. It uses a HWND to ::PostMessage to it as a signal that | 26 // and dispatching. It uses a HWND to ::PostMessage to it as a signal that |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Lock accesses to |pending_tasks_|. | 59 // Lock accesses to |pending_tasks_|. |
60 base::Lock lock_; | 60 base::Lock lock_; |
61 | 61 |
62 // ::PostMessage parameters. | 62 // ::PostMessage parameters. |
63 HWND wnd_; | 63 HWND wnd_; |
64 UINT msg_; | 64 UINT msg_; |
65 }; | 65 }; |
66 | 66 |
67 #endif // CHROME_FRAME_TASK_MARSHALLER_H_ | 67 #endif // CHROME_FRAME_TASK_MARSHALLER_H_ |
OLD | NEW |