| 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 #ifndef PPAPI_PROXY_HOST_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ | 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
| 15 #include "ipc/ipc_channel_proxy.h" | 15 #include "ipc/ipc_message_filter.h" |
| 16 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
| 17 #include "ppapi/proxy/dispatcher.h" | 17 #include "ppapi/proxy/dispatcher.h" |
| 18 | 18 |
| 19 struct PPB_Proxy_Private; | 19 struct PPB_Proxy_Private; |
| 20 | 20 |
| 21 namespace ppapi { | 21 namespace ppapi { |
| 22 | 22 |
| 23 struct Preferences; | 23 struct Preferences; |
| 24 | 24 |
| 25 namespace proxy { | 25 namespace proxy { |
| 26 | 26 |
| 27 class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher { | 27 class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher { |
| 28 public: | 28 public: |
| 29 // This interface receives notifications about sync messages being sent by | 29 // This interface receives notifications about sync messages being sent by |
| 30 // the dispatcher to the plugin process. It is used to detect a hung plugin. | 30 // the dispatcher to the plugin process. It is used to detect a hung plugin. |
| 31 // | 31 // |
| 32 // Note that there can be nested sync messages, so the begin/end status | 32 // Note that there can be nested sync messages, so the begin/end status |
| 33 // actually represents a stack of blocking messages. | 33 // actually represents a stack of blocking messages. |
| 34 class SyncMessageStatusReceiver : public IPC::ChannelProxy::MessageFilter { | 34 class SyncMessageStatusReceiver : public IPC::MessageFilter { |
| 35 public: | 35 public: |
| 36 // Notification that a sync message is about to be sent out. | 36 // Notification that a sync message is about to be sent out. |
| 37 virtual void BeginBlockOnSyncMessage() = 0; | 37 virtual void BeginBlockOnSyncMessage() = 0; |
| 38 | 38 |
| 39 // Notification that a sync message reply was received and the dispatcher | 39 // Notification that a sync message reply was received and the dispatcher |
| 40 // is no longer blocked on a sync message. | 40 // is no longer blocked on a sync message. |
| 41 virtual void EndBlockOnSyncMessage() = 0; | 41 virtual void EndBlockOnSyncMessage() = 0; |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 virtual ~SyncMessageStatusReceiver() {} | 44 virtual ~SyncMessageStatusReceiver() {} |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 private: | 151 private: |
| 152 HostDispatcher* dispatcher_; | 152 HostDispatcher* dispatcher_; |
| 153 | 153 |
| 154 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); | 154 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 } // namespace proxy | 157 } // namespace proxy |
| 158 } // namespace ppapi | 158 } // namespace ppapi |
| 159 | 159 |
| 160 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ | 160 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ |
| OLD | NEW |