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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual base::WaitableEvent* GetModalDialogEvent(int render_view_id) override; | 46 virtual base::WaitableEvent* GetModalDialogEvent(int render_view_id) override; |
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 #if defined(OS_POSIX) | 53 #if defined(OS_POSIX) |
54 int TakeRendererFileDescriptor() { | 54 base::ScopedFD TakeRendererFileDescriptor() { |
55 return channel_->TakeClientFileDescriptor(); | 55 return channel_->TakeClientFileDescriptor(); |
56 } | 56 } |
57 #endif | 57 #endif |
58 | 58 |
59 protected: | 59 protected: |
60 virtual ~PluginChannel(); | 60 virtual ~PluginChannel(); |
61 | 61 |
62 // NPChannelBase:: | 62 // NPChannelBase:: |
63 virtual void CleanUp() override; | 63 virtual void CleanUp() override; |
64 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, | 64 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Dummy NPP value used in the plugin process to represent entities other | 98 // Dummy NPP value used in the plugin process to represent entities other |
99 // that other plugin instances for the purpose of object ownership tracking. | 99 // that other plugin instances for the purpose of object ownership tracking. |
100 scoped_ptr<struct _NPP> npp_; | 100 scoped_ptr<struct _NPP> npp_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(PluginChannel); | 102 DISALLOW_COPY_AND_ASSIGN(PluginChannel); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace content | 105 } // namespace content |
106 | 106 |
107 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ | 107 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_ |
OLD | NEW |