| 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_HOST_RESOURCE_HOST_H_ | 5 #ifndef PPAPI_HOST_RESOURCE_HOST_H_ |
| 6 #define PPAPI_HOST_RESOURCE_HOST_H_ | 6 #define PPAPI_HOST_RESOURCE_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void SendReply(const ReplyMessageContext& context, | 54 void SendReply(const ReplyMessageContext& context, |
| 55 const IPC::Message& msg) override; | 55 const IPC::Message& msg) override; |
| 56 | 56 |
| 57 // Simple RTTI. A subclass that is a host for one of these APIs will override | 57 // Simple RTTI. A subclass that is a host for one of these APIs will override |
| 58 // the appropriate function and return true. | 58 // the appropriate function and return true. |
| 59 virtual bool IsCompositorHost(); | 59 virtual bool IsCompositorHost(); |
| 60 virtual bool IsFileRefHost(); | 60 virtual bool IsFileRefHost(); |
| 61 virtual bool IsFileSystemHost(); | 61 virtual bool IsFileSystemHost(); |
| 62 virtual bool IsGraphics2DHost(); | 62 virtual bool IsGraphics2DHost(); |
| 63 virtual bool IsMediaStreamVideoTrackHost(); | 63 virtual bool IsMediaStreamVideoTrackHost(); |
| 64 | |
| 65 protected: | 64 protected: |
| 66 // Adds a ResourceMessageFilter to handle resource messages. Incoming | 65 // Adds a ResourceMessageFilter to handle resource messages. Incoming |
| 67 // messages will be passed to the handlers of these filters before being | 66 // messages will be passed to the handlers of these filters before being |
| 68 // handled by the resource host's own message handler. This allows | 67 // handled by the resource host's own message handler. This allows |
| 69 // ResourceHosts to easily handle messages on other threads. | 68 // ResourceHosts to easily handle messages on other threads. |
| 70 void AddFilter(scoped_refptr<ResourceMessageFilter> filter); | 69 void AddFilter(scoped_refptr<ResourceMessageFilter> filter); |
| 71 | 70 |
| 72 // Called when this resource host is pending and the corresponding plugin has | 71 // Called when this resource host is pending and the corresponding plugin has |
| 73 // just connected to it. The host resource subclass can implement this | 72 // just connected to it. The host resource subclass can implement this |
| 74 // function if it wants to do processing (typically sending queued data). | 73 // function if it wants to do processing (typically sending queued data). |
| (...skipping 12 matching lines...) Expand all Loading... |
| 87 // messages to. | 86 // messages to. |
| 88 std::vector<scoped_refptr<ResourceMessageFilter> > message_filters_; | 87 std::vector<scoped_refptr<ResourceMessageFilter> > message_filters_; |
| 89 | 88 |
| 90 DISALLOW_COPY_AND_ASSIGN(ResourceHost); | 89 DISALLOW_COPY_AND_ASSIGN(ResourceHost); |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 } // namespace host | 92 } // namespace host |
| 94 } // namespace ppapi | 93 } // namespace ppapi |
| 95 | 94 |
| 96 #endif // PPAPI_HOST_RESOURCE_HOST_H_ | 95 #endif // PPAPI_HOST_RESOURCE_HOST_H_ |
| OLD | NEW |