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