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 CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
6 #define CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 6 #define CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 private: | 88 private: |
89 // Struct for storing the result of a v8 object being converted to a PP_Var. | 89 // Struct for storing the result of a v8 object being converted to a PP_Var. |
90 struct VarConversionResult; | 90 struct VarConversionResult; |
91 | 91 |
92 explicit MessageChannel(PepperPluginInstanceImpl* instance); | 92 explicit MessageChannel(PepperPluginInstanceImpl* instance); |
93 | 93 |
94 // gin::NamedPropertyInterceptor | 94 // gin::NamedPropertyInterceptor |
95 virtual v8::Local<v8::Value> GetNamedProperty( | 95 virtual v8::Local<v8::Value> GetNamedProperty( |
96 v8::Isolate* isolate, | 96 v8::Isolate* isolate, |
97 const std::string& property) OVERRIDE; | 97 const std::string& property) override; |
98 virtual bool SetNamedProperty(v8::Isolate* isolate, | 98 virtual bool SetNamedProperty(v8::Isolate* isolate, |
99 const std::string& property, | 99 const std::string& property, |
100 v8::Local<v8::Value> value) OVERRIDE; | 100 v8::Local<v8::Value> value) override; |
101 virtual std::vector<std::string> EnumerateNamedProperties( | 101 virtual std::vector<std::string> EnumerateNamedProperties( |
102 v8::Isolate* isolate) OVERRIDE; | 102 v8::Isolate* isolate) override; |
103 | 103 |
104 // gin::Wrappable | 104 // gin::Wrappable |
105 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | 105 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
106 v8::Isolate* isolate) OVERRIDE; | 106 v8::Isolate* isolate) override; |
107 | 107 |
108 // ppapi::proxy::HostDispatcher::SyncMessageStatusObserver | 108 // ppapi::proxy::HostDispatcher::SyncMessageStatusObserver |
109 virtual void BeginBlockOnSyncMessage() OVERRIDE; | 109 virtual void BeginBlockOnSyncMessage() override; |
110 virtual void EndBlockOnSyncMessage() OVERRIDE; | 110 virtual void EndBlockOnSyncMessage() override; |
111 | 111 |
112 // Post a message to the plugin's HandleMessage function for this channel's | 112 // Post a message to the plugin's HandleMessage function for this channel's |
113 // instance. | 113 // instance. |
114 void PostMessageToNative(gin::Arguments* args); | 114 void PostMessageToNative(gin::Arguments* args); |
115 // Post a message to the plugin's HandleBlocking Message function for this | 115 // Post a message to the plugin's HandleBlocking Message function for this |
116 // channel's instance synchronously, and return a result. | 116 // channel's instance synchronously, and return a result. |
117 void PostBlockingMessageToNative(gin::Arguments* args); | 117 void PostBlockingMessageToNative(gin::Arguments* args); |
118 | 118 |
119 // Post a message to the onmessage handler for this channel's instance | 119 // Post a message to the onmessage handler for this channel's instance |
120 // synchronously. This is used by PostMessageToJavaScript. | 120 // synchronously. This is used by PostMessageToJavaScript. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // This is used to ensure pending tasks will not fire after this object is | 187 // This is used to ensure pending tasks will not fire after this object is |
188 // destroyed. | 188 // destroyed. |
189 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; | 189 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; |
190 | 190 |
191 DISALLOW_COPY_AND_ASSIGN(MessageChannel); | 191 DISALLOW_COPY_AND_ASSIGN(MessageChannel); |
192 }; | 192 }; |
193 | 193 |
194 } // namespace content | 194 } // namespace content |
195 | 195 |
196 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 196 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
OLD | NEW |