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