| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGIN_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PLUGIN_CHANNEL_HOST_H_ |
| 6 #define CONTENT_RENDERER_PLUGIN_CHANNEL_HOST_H_ | 6 #define CONTENT_RENDERER_PLUGIN_CHANNEL_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "content/common/np_channel_base.h" | 10 #include "content/common/np_channel_base.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Called on the render thread | 48 // Called on the render thread |
| 49 PluginChannelHost(); | 49 PluginChannelHost(); |
| 50 virtual ~PluginChannelHost(); | 50 virtual ~PluginChannelHost(); |
| 51 | 51 |
| 52 static NPChannelBase* ClassFactory() { return new PluginChannelHost(); } | 52 static NPChannelBase* ClassFactory() { return new PluginChannelHost(); } |
| 53 | 53 |
| 54 virtual bool OnControlMessageReceived(const IPC::Message& message); | 54 virtual bool OnControlMessageReceived(const IPC::Message& message); |
| 55 void OnSetException(const std::string& message); | 55 void OnSetException(const std::string& message); |
| 56 void OnPluginShuttingDown(const IPC::Message& message); | 56 void OnPluginShuttingDown(); |
| 57 | 57 |
| 58 // Keep track of all the registered WebPluginDelegeProxies to | 58 // Keep track of all the registered WebPluginDelegeProxies to |
| 59 // inform about OnChannelError | 59 // inform about OnChannelError |
| 60 typedef base::hash_map<int, IPC::Channel::Listener*> ProxyMap; | 60 typedef base::hash_map<int, IPC::Channel::Listener*> ProxyMap; |
| 61 ProxyMap proxies_; | 61 ProxyMap proxies_; |
| 62 | 62 |
| 63 // An IPC MessageFilter that can be told to filter out all messages. This is | 63 // An IPC MessageFilter that can be told to filter out all messages. This is |
| 64 // used when the JS debugger is attached in order to avoid browser hangs. | 64 // used when the JS debugger is attached in order to avoid browser hangs. |
| 65 scoped_refptr<IsListeningFilter> is_listening_filter_; | 65 scoped_refptr<IsListeningFilter> is_listening_filter_; |
| 66 | 66 |
| 67 // True if we are expecting the plugin process to go away - in which case, | 67 // True if we are expecting the plugin process to go away - in which case, |
| 68 // don't treat it as a crash. | 68 // don't treat it as a crash. |
| 69 bool expecting_shutdown_; | 69 bool expecting_shutdown_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(PluginChannelHost); | 71 DISALLOW_COPY_AND_ASSIGN(PluginChannelHost); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 #endif // CONTENT_RENDERER_PLUGIN_CHANNEL_HOST_H_ | 74 #endif // CONTENT_RENDERER_PLUGIN_CHANNEL_HOST_H_ |
| OLD | NEW |