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 | |
51 // This creates both an STA and an MTA threads. We must make sure we only call | 48 // This creates both an STA and an MTA threads. We must make sure we only call |
52 // Chrome Frame from this STA. And since we can't block Chrome Frame we use | 49 // Chrome Frame from this STA. And since we can't block Chrome Frame we use |
53 // the MTA thread to executes API Invocation we receive from Chrome Frame. | 50 // the MTA thread to executes API Invocation we receive from Chrome Frame. |
54 // We also create and initialize Chrome Framer from here. | 51 // We also create and initialize Chrome Framer from here. |
55 virtual void Init(); | 52 virtual void Init(); |
56 | 53 |
57 // To cleanly terminate the threads, and our hooks into Chrome Frame. | 54 // To cleanly terminate the threads, and our hooks into Chrome Frame. |
58 virtual void Term(); | 55 virtual void Term(); |
59 | 56 |
60 // Returns our single instance held by the module. | 57 // Returns our single instance held by the module. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ApiInvocationWorkerThread api_worker_thread_; | 124 ApiInvocationWorkerThread api_worker_thread_; |
128 | 125 |
129 // The number of times we tried to launch ChromeFrame. | 126 // The number of times we tried to launch ChromeFrame. |
130 int frame_reset_count_; | 127 int frame_reset_count_; |
131 | 128 |
132 // "in the end, there should be only one!" :-) | 129 // "in the end, there should be only one!" :-) |
133 static ChromePostman* single_instance_; | 130 static ChromePostman* single_instance_; |
134 }; | 131 }; |
135 | 132 |
136 #endif // CEEE_IE_BROKER_CHROME_POSTMAN_H_ | 133 #endif // CEEE_IE_BROKER_CHROME_POSTMAN_H_ |
OLD | NEW |