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 #include "content/plugin/plugin_channel.h" | 5 #include "content/plugin/plugin_channel.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // static | 159 // static |
160 void PluginChannel::NotifyRenderersOfPendingShutdown() { | 160 void PluginChannel::NotifyRenderersOfPendingShutdown() { |
161 Broadcast(new PluginHostMsg_PluginShuttingDown()); | 161 Broadcast(new PluginHostMsg_PluginShuttingDown()); |
162 } | 162 } |
163 | 163 |
164 PluginChannel::PluginChannel() | 164 PluginChannel::PluginChannel() |
165 : renderer_handle_(0), | 165 : renderer_handle_(0), |
166 renderer_id_(-1), | 166 renderer_id_(-1), |
167 in_send_(0), | 167 in_send_(0), |
168 incognito_(false), | 168 incognito_(false), |
| 169 save_local_state_(false), |
169 filter_(new MessageFilter()) { | 170 filter_(new MessageFilter()) { |
170 set_send_unblocking_only_during_unblock_dispatch(); | 171 set_send_unblocking_only_during_unblock_dispatch(); |
171 ChildProcess::current()->AddRefProcess(); | 172 ChildProcess::current()->AddRefProcess(); |
172 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 173 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
173 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); | 174 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); |
174 } | 175 } |
175 | 176 |
176 PluginChannel::~PluginChannel() { | 177 PluginChannel::~PluginChannel() { |
177 if (renderer_handle_) | 178 if (renderer_handle_) |
178 base::CloseProcessHandle(renderer_handle_); | 179 base::CloseProcessHandle(renderer_handle_); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 326 |
326 bool PluginChannel::Init(base::MessageLoopProxy* ipc_message_loop, | 327 bool PluginChannel::Init(base::MessageLoopProxy* ipc_message_loop, |
327 bool create_pipe_now) { | 328 bool create_pipe_now) { |
328 if (!PluginChannelBase::Init(ipc_message_loop, create_pipe_now)) | 329 if (!PluginChannelBase::Init(ipc_message_loop, create_pipe_now)) |
329 return false; | 330 return false; |
330 | 331 |
331 channel_->AddFilter(filter_.get()); | 332 channel_->AddFilter(filter_.get()); |
332 return true; | 333 return true; |
333 } | 334 } |
334 | 335 |
OLD | NEW |