| 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 #include "content/plugin/plugin_channel.h" | 5 #include "content/plugin/plugin_channel.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 int PluginChannel::GenerateRouteID() { | 197 int PluginChannel::GenerateRouteID() { |
| 198 static int last_id = 0; | 198 static int last_id = 0; |
| 199 return ++last_id; | 199 return ++last_id; |
| 200 } | 200 } |
| 201 | 201 |
| 202 base::WaitableEvent* PluginChannel::GetModalDialogEvent(int render_view_id) { | 202 base::WaitableEvent* PluginChannel::GetModalDialogEvent(int render_view_id) { |
| 203 return filter_->GetModalDialogEvent(render_view_id); | 203 return filter_->GetModalDialogEvent(render_view_id); |
| 204 } | 204 } |
| 205 | 205 |
| 206 PluginChannel::~PluginChannel() { | 206 PluginChannel::~PluginChannel() { |
| 207 PluginThread::current()->Send(new PluginProcessHostMsg_ChannelDestroyed( |
| 208 renderer_id_)); |
| 207 base::MessageLoop::current()->PostDelayedTask( | 209 base::MessageLoop::current()->PostDelayedTask( |
| 208 FROM_HERE, | 210 FROM_HERE, |
| 209 base::Bind(&PluginReleaseCallback), | 211 base::Bind(&PluginReleaseCallback), |
| 210 base::TimeDelta::FromMinutes(kPluginReleaseTimeMinutes)); | 212 base::TimeDelta::FromMinutes(kPluginReleaseTimeMinutes)); |
| 211 } | 213 } |
| 212 | 214 |
| 213 void PluginChannel::CleanUp() { | 215 void PluginChannel::CleanUp() { |
| 214 // We need to clean up the stubs so that they call NPPDestroy. This will | 216 // We need to clean up the stubs so that they call NPPDestroy. This will |
| 215 // also lead to them releasing their reference on this object so that it can | 217 // also lead to them releasing their reference on this object so that it can |
| 216 // be deleted. | 218 // be deleted. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 : base::StringPrintf("\"%s\"", site_str); | 325 : base::StringPrintf("\"%s\"", site_str); |
| 324 VLOG(1) << "NPP_ClearSiteData(" << site_name << ", " << flags << ", " | 326 VLOG(1) << "NPP_ClearSiteData(" << site_name << ", " << flags << ", " |
| 325 << max_age << ") returned " << err; | 327 << max_age << ") returned " << err; |
| 326 success = (err == NPERR_NO_ERROR); | 328 success = (err == NPERR_NO_ERROR); |
| 327 } | 329 } |
| 328 } | 330 } |
| 329 Send(new PluginProcessHostMsg_ClearSiteDataResult(success)); | 331 Send(new PluginProcessHostMsg_ClearSiteDataResult(success)); |
| 330 } | 332 } |
| 331 | 333 |
| 332 } // namespace content | 334 } // namespace content |
| OLD | NEW |