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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // | 49 // |
50 // The current PP_Resource for all pending hosts should be 0. See | 50 // The current PP_Resource for all pending hosts should be 0. See |
51 // PpapiHostMsg_AttachToPendingHost. | 51 // PpapiHostMsg_AttachToPendingHost. |
52 void SetPPResourceForPendingHost(PP_Resource pp_resource); | 52 void SetPPResourceForPendingHost(PP_Resource pp_resource); |
53 | 53 |
54 virtual void SendReply(const ReplyMessageContext& context, | 54 virtual 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(); | |
60 virtual bool IsFileRefHost(); | 59 virtual bool IsFileRefHost(); |
61 virtual bool IsFileSystemHost(); | 60 virtual bool IsFileSystemHost(); |
62 virtual bool IsGraphics2DHost(); | 61 virtual bool IsGraphics2DHost(); |
63 virtual bool IsMediaStreamVideoTrackHost(); | 62 virtual bool IsMediaStreamVideoTrackHost(); |
64 | 63 |
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. |
(...skipping 17 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 |