| 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_PLUGIN_PLUGIN_CHANNEL_H_ | 5 #ifndef CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
| 6 #define CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ | 6 #define CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 11 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 10 #include "base/process/process.h" | 13 #include "base/process/process.h" |
| 11 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 12 #include "content/child/npapi/np_channel_base.h" | 15 #include "content/child/npapi/np_channel_base.h" |
| 13 #include "content/child/scoped_child_process_reference.h" | 16 #include "content/child/scoped_child_process_reference.h" |
| 14 #include "content/plugin/webplugin_delegate_stub.h" | 17 #include "content/plugin/webplugin_delegate_stub.h" |
| 15 | 18 |
| 16 namespace base { | 19 namespace base { |
| 17 class WaitableEvent; | 20 class WaitableEvent; |
| 18 } | 21 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 PluginChannel(); | 76 PluginChannel(); |
| 74 | 77 |
| 75 bool OnControlMessageReceived(const IPC::Message& msg) override; | 78 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 76 | 79 |
| 77 static NPChannelBase* ClassFactory() { return new PluginChannel(); } | 80 static NPChannelBase* ClassFactory() { return new PluginChannel(); } |
| 78 | 81 |
| 79 void OnCreateInstance(const std::string& mime_type, int* instance_id); | 82 void OnCreateInstance(const std::string& mime_type, int* instance_id); |
| 80 void OnDestroyInstance(int instance_id, IPC::Message* reply_msg); | 83 void OnDestroyInstance(int instance_id, IPC::Message* reply_msg); |
| 81 void OnGenerateRouteID(int* route_id); | 84 void OnGenerateRouteID(int* route_id); |
| 82 void OnClearSiteData(const std::string& site, | 85 void OnClearSiteData(const std::string& site, |
| 83 uint64 flags, | 86 uint64_t flags, |
| 84 uint64 max_age); | 87 uint64_t max_age); |
| 85 void OnDidAbortLoading(int render_view_id); | 88 void OnDidAbortLoading(int render_view_id); |
| 86 | 89 |
| 87 std::vector<scoped_refptr<WebPluginDelegateStub> > plugin_stubs_; | 90 std::vector<scoped_refptr<WebPluginDelegateStub> > plugin_stubs_; |
| 88 | 91 |
| 89 ScopedChildProcessReference process_ref_; | 92 ScopedChildProcessReference process_ref_; |
| 90 | 93 |
| 91 // The id of the renderer who is on the other side of the channel. | 94 // The id of the renderer who is on the other side of the channel. |
| 92 int renderer_id_; | 95 int renderer_id_; |
| 93 | 96 |
| 94 int in_send_; // Tracks if we're in a Send call. | 97 int in_send_; // Tracks if we're in a Send call. |
| 95 bool log_messages_; // True if we should log sent and received messages. | 98 bool log_messages_; // True if we should log sent and received messages. |
| 96 bool incognito_; // True if the renderer is in incognito mode. | 99 bool incognito_; // True if the renderer is in incognito mode. |
| 97 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. | 100 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. |
| 98 | 101 |
| 99 // Dummy NPP value used in the plugin process to represent entities other | 102 // Dummy NPP value used in the plugin process to represent entities other |
| 100 // that other plugin instances for the purpose of object ownership tracking. | 103 // that other plugin instances for the purpose of object ownership tracking. |
| 101 scoped_ptr<struct _NPP> npp_; | 104 scoped_ptr<struct _NPP> npp_; |
| 102 | 105 |
| 103 DISALLOW_COPY_AND_ASSIGN(PluginChannel); | 106 DISALLOW_COPY_AND_ASSIGN(PluginChannel); |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 } // namespace content | 109 } // namespace content |
| 107 | 110 |
| 108 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ | 111 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
| OLD | NEW |