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_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Returns the event that's set when a call to the renderer causes a modal | 44 // Returns the event that's set when a call to the renderer causes a modal |
45 // dialog to come up. | 45 // dialog to come up. |
46 base::WaitableEvent* GetModalDialogEvent(gfx::NativeViewId containing_window); | 46 base::WaitableEvent* GetModalDialogEvent(gfx::NativeViewId containing_window); |
47 | 47 |
48 bool in_send() { return in_send_ != 0; } | 48 bool in_send() { return in_send_ != 0; } |
49 | 49 |
50 bool incognito() { return incognito_; } | 50 bool incognito() { return incognito_; } |
51 void set_incognito(bool value) { incognito_ = value; } | 51 void set_incognito(bool value) { incognito_ = value; } |
52 | 52 |
| 53 bool save_local_state() { return save_local_state_; } |
| 54 void set_save_local_state(bool value) { save_local_state_ = value; } |
| 55 |
53 #if defined(OS_POSIX) | 56 #if defined(OS_POSIX) |
54 int renderer_fd() const { return channel_->GetClientFileDescriptor(); } | 57 int renderer_fd() const { return channel_->GetClientFileDescriptor(); } |
55 #endif | 58 #endif |
56 | 59 |
57 protected: | 60 protected: |
58 // IPC::Channel::Listener implementation: | 61 // IPC::Channel::Listener implementation: |
59 virtual void OnChannelConnected(int32 peer_pid); | 62 virtual void OnChannelConnected(int32 peer_pid); |
60 virtual void OnChannelError(); | 63 virtual void OnChannelError(); |
61 | 64 |
62 virtual void CleanUp(); | 65 virtual void CleanUp(); |
(...skipping 23 matching lines...) Expand all Loading... |
86 | 89 |
87 // Handle to the renderer process who is on the other side of the channel. | 90 // Handle to the renderer process who is on the other side of the channel. |
88 base::ProcessHandle renderer_handle_; | 91 base::ProcessHandle renderer_handle_; |
89 | 92 |
90 // The id of the renderer who is on the other side of the channel. | 93 // The id of the renderer who is on the other side of the channel. |
91 int renderer_id_; | 94 int renderer_id_; |
92 | 95 |
93 int in_send_; // Tracks if we're in a Send call. | 96 int in_send_; // Tracks if we're in a Send call. |
94 bool log_messages_; // True if we should log sent and received messages. | 97 bool log_messages_; // True if we should log sent and received messages. |
95 bool incognito_; // True if the renderer is in incognito mode. | 98 bool incognito_; // True if the renderer is in incognito mode. |
| 99 bool save_local_state_; // True if the renderer should save local state. |
96 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. | 100 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. |
97 | 101 |
98 DISALLOW_COPY_AND_ASSIGN(PluginChannel); | 102 DISALLOW_COPY_AND_ASSIGN(PluginChannel); |
99 }; | 103 }; |
100 | 104 |
101 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ | 105 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
OLD | NEW |