diff options
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/plugin_channel.cc | 2 | ||||
-rw-r--r-- | chrome/plugin/plugin_channel.h | 4 | ||||
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 6 | ||||
-rw-r--r-- | chrome/plugin/plugin_thread.h | 2 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 4 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.h | 2 |
6 files changed, 16 insertions, 4 deletions
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc index 675a46f..125054a 100644 --- a/chrome/plugin/plugin_channel.cc +++ b/chrome/plugin/plugin_channel.cc @@ -27,7 +27,7 @@ PluginChannel* PluginChannel::GetPluginChannel(MessageLoop* ipc_message_loop) { false)); } -PluginChannel::PluginChannel() : in_send_(0) { +PluginChannel::PluginChannel() : in_send_(0), off_the_record_(false) { SendUnblockingOnlyDuringDispatch(); PluginProcess::current()->AddRefProcess(); const CommandLine* command_line = CommandLine::ForCurrentProcess(); diff --git a/chrome/plugin/plugin_channel.h b/chrome/plugin/plugin_channel.h index 22ebbfa..94d18f9 100644 --- a/chrome/plugin/plugin_channel.h +++ b/chrome/plugin/plugin_channel.h @@ -26,6 +26,9 @@ class PluginChannel : public PluginChannelBase { bool in_send() { return in_send_ != 0; } + bool off_the_record() { return off_the_record_; } + void set_off_the_record(bool value) { off_the_record_ = value; } + protected: // IPC::Channel::Listener implementation: virtual void OnChannelConnected(int32 peer_pid); @@ -52,6 +55,7 @@ class PluginChannel : public PluginChannelBase { int in_send_; // Tracks if we're in a Send call. bool log_messages_; // True if we should log sent and received messages. + bool off_the_record_; // True if the renderer is in off the record mode. DISALLOW_EVIL_CONSTRUCTORS(PluginChannel); }; diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 5f26f71..10172e7 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -88,12 +88,14 @@ void PluginThread::CleanUp() { ChildThread::CleanUp(); } -void PluginThread::OnCreateChannel() { +void PluginThread::OnCreateChannel(bool off_the_record) { std::wstring channel_name; scoped_refptr<PluginChannel> channel = PluginChannel::GetPluginChannel(owner_loop()); - if (channel.get()) + if (channel.get()) { channel_name = channel->channel_name(); + channel->set_off_the_record(off_the_record); + } Send(new PluginProcessHostMsg_ChannelCreated(channel_name)); } diff --git a/chrome/plugin/plugin_thread.h b/chrome/plugin/plugin_thread.h index bcf926f..1550d5a 100644 --- a/chrome/plugin/plugin_thread.h +++ b/chrome/plugin/plugin_thread.h @@ -29,7 +29,7 @@ class PluginThread : public ChildThread { virtual void Init(); virtual void CleanUp(); - void OnCreateChannel(); + void OnCreateChannel(bool off_the_record); void OnShutdownResponse(bool ok_to_shutdown); void OnPluginMessage(const std::vector<uint8> &data); void OnBrowserShutdown(); diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index dbe9b5a..38310fb 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -439,3 +439,7 @@ void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { Paint(damaged_rect); Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); } + +bool WebPluginProxy::IsOffTheRecord() { + return channel_->off_the_record(); +} diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h index 78ca43c..cba1ac5 100644 --- a/chrome/plugin/webplugin_proxy.h +++ b/chrome/plugin/webplugin_proxy.h @@ -94,6 +94,8 @@ class WebPluginProxy : public WebPlugin { bool notify_needed, HANDLE notify_data); + bool IsOffTheRecord(); + base::WaitableEvent* modal_dialog_event() { return modal_dialog_event_.get(); } |