| 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 <vector> | 8 #include <vector> |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_handle.h" | 10 #include "base/memory/scoped_handle.h" |
| 11 #include "base/process.h" | 11 #include "base/process.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "content/common/np_channel_base.h" | 13 #include "content/common/np_channel_base.h" |
| 14 #include "content/plugin/webplugin_delegate_stub.h" | 14 #include "content/plugin/webplugin_delegate_stub.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class WaitableEvent; | 17 class WaitableEvent; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace content { |
| 21 |
| 20 // Encapsulates an IPC channel between the plugin process and one renderer | 22 // Encapsulates an IPC channel between the plugin process and one renderer |
| 21 // process. On the renderer side there's a corresponding PluginChannelHost. | 23 // process. On the renderer side there's a corresponding PluginChannelHost. |
| 22 class PluginChannel : public NPChannelBase { | 24 class PluginChannel : public NPChannelBase { |
| 23 public: | 25 public: |
| 24 // Get a new PluginChannel object for the current process to talk to the | 26 // Get a new PluginChannel object for the current process to talk to the |
| 25 // given renderer process. The renderer ID is an opaque unique ID generated | 27 // given renderer process. The renderer ID is an opaque unique ID generated |
| 26 // by the browser. | 28 // by the browser. |
| 27 static PluginChannel* GetPluginChannel( | 29 static PluginChannel* GetPluginChannel( |
| 28 int renderer_id, base::MessageLoopProxy* ipc_message_loop); | 30 int renderer_id, base::MessageLoopProxy* ipc_message_loop); |
| 29 | 31 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 int renderer_id_; | 89 int renderer_id_; |
| 88 | 90 |
| 89 int in_send_; // Tracks if we're in a Send call. | 91 int in_send_; // Tracks if we're in a Send call. |
| 90 bool log_messages_; // True if we should log sent and received messages. | 92 bool log_messages_; // True if we should log sent and received messages. |
| 91 bool incognito_; // True if the renderer is in incognito mode. | 93 bool incognito_; // True if the renderer is in incognito mode. |
| 92 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. | 94 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. |
| 93 | 95 |
| 94 DISALLOW_COPY_AND_ASSIGN(PluginChannel); | 96 DISALLOW_COPY_AND_ASSIGN(PluginChannel); |
| 95 }; | 97 }; |
| 96 | 98 |
| 99 } // namespace content |
| 100 |
| 97 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ | 101 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
| OLD | NEW |