OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // @file | 5 // @file |
6 // Broke Postman implementation. | 6 // Broke Postman implementation. |
7 | 7 |
8 #ifndef CEEE_IE_BROKER_CHROME_POSTMAN_H_ | 8 #ifndef CEEE_IE_BROKER_CHROME_POSTMAN_H_ |
9 #define CEEE_IE_BROKER_CHROME_POSTMAN_H_ | 9 #define CEEE_IE_BROKER_CHROME_POSTMAN_H_ |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 ChromePostman(); | 38 ChromePostman(); |
39 virtual ~ChromePostman(); | 39 virtual ~ChromePostman(); |
40 | 40 |
41 // This posts a tasks to our STA thread so that it posts the given message | 41 // This posts a tasks to our STA thread so that it posts the given message |
42 // to Chrome Frame. | 42 // to Chrome Frame. |
43 virtual void PostMessage(BSTR message, BSTR target); | 43 virtual void PostMessage(BSTR message, BSTR target); |
44 | 44 |
45 // This posts a tasks to the Api Invocation thread to fire the given event. | 45 // This posts a tasks to the Api Invocation thread to fire the given event. |
46 virtual void FireEvent(const char* event_name, const char* event_args); | 46 virtual void FireEvent(const char* event_name, const char* event_args); |
47 | 47 |
| 48 // This queues a generic tasks to be executed in the Api Invocation thread. |
| 49 virtual void QueueApiInvocationThreadTask(Task* task); |
| 50 |
48 // This creates both an STA and an MTA threads. We must make sure we only call | 51 // This creates both an STA and an MTA threads. We must make sure we only call |
49 // Chrome Frame from this STA. And since we can't block Chrome Frame we use | 52 // Chrome Frame from this STA. And since we can't block Chrome Frame we use |
50 // the MTA thread to executes API Invocation we receive from Chrome Frame. | 53 // the MTA thread to executes API Invocation we receive from Chrome Frame. |
51 // We also create and initialize Chrome Framer from here. | 54 // We also create and initialize Chrome Framer from here. |
52 virtual void Init(); | 55 virtual void Init(); |
53 | 56 |
54 // To cleanly terminate the threads, and our hooks into Chrome Frame. | 57 // To cleanly terminate the threads, and our hooks into Chrome Frame. |
55 virtual void Term(); | 58 virtual void Term(); |
56 | 59 |
57 // Returns our single instance held by the module. | 60 // Returns our single instance held by the module. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ApiInvocationWorkerThread api_worker_thread_; | 127 ApiInvocationWorkerThread api_worker_thread_; |
125 | 128 |
126 // The number of times we tried to launch ChromeFrame. | 129 // The number of times we tried to launch ChromeFrame. |
127 int frame_reset_count_; | 130 int frame_reset_count_; |
128 | 131 |
129 // "in the end, there should be only one!" :-) | 132 // "in the end, there should be only one!" :-) |
130 static ChromePostman* single_instance_; | 133 static ChromePostman* single_instance_; |
131 }; | 134 }; |
132 | 135 |
133 #endif // CEEE_IE_BROKER_CHROME_POSTMAN_H_ | 136 #endif // CEEE_IE_BROKER_CHROME_POSTMAN_H_ |
OLD | NEW |