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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 // Get a new PluginChannel object for the current process to talk to the | 25 // Get a new PluginChannel object for the current process to talk to the |
26 // given renderer process. The renderer ID is an opaque unique ID generated | 26 // given renderer process. The renderer ID is an opaque unique ID generated |
27 // by the browser. | 27 // by the browser. |
28 static PluginChannel* GetPluginChannel( | 28 static PluginChannel* GetPluginChannel( |
29 int renderer_id, base::MessageLoopProxy* ipc_message_loop); | 29 int renderer_id, base::MessageLoopProxy* ipc_message_loop); |
30 | 30 |
31 // Send a message to all renderers that the process is going to shutdown. | 31 // Send a message to all renderers that the process is going to shutdown. |
32 static void NotifyRenderersOfPendingShutdown(); | 32 static void NotifyRenderersOfPendingShutdown(); |
33 | 33 |
34 // IPC::Channel::Listener: | 34 // IPC::Listener: |
35 virtual bool Send(IPC::Message* msg) OVERRIDE; | 35 virtual bool Send(IPC::Message* msg) OVERRIDE; |
36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
37 virtual void OnChannelError() OVERRIDE; | 37 virtual void OnChannelError() OVERRIDE; |
38 | 38 |
39 int renderer_id() { return renderer_id_; } | 39 int renderer_id() { return renderer_id_; } |
40 | 40 |
41 virtual int GenerateRouteID() OVERRIDE; | 41 virtual int GenerateRouteID() OVERRIDE; |
42 | 42 |
43 // Returns the event that's set when a call to the renderer causes a modal | 43 // Returns the event that's set when a call to the renderer causes a modal |
44 // dialog to come up. | 44 // dialog to come up. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 int in_send_; // Tracks if we're in a Send call. | 90 int in_send_; // Tracks if we're in a Send call. |
91 bool log_messages_; // True if we should log sent and received messages. | 91 bool log_messages_; // True if we should log sent and received messages. |
92 bool incognito_; // True if the renderer is in incognito mode. | 92 bool incognito_; // True if the renderer is in incognito mode. |
93 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. | 93 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(PluginChannel); | 95 DISALLOW_COPY_AND_ASSIGN(PluginChannel); |
96 }; | 96 }; |
97 | 97 |
98 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ | 98 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
OLD | NEW |