| 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/renderer/pepper/pepper_hung_plugin_filter.h" | 5 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/child/child_process.h" | 8 #include "content/child/child_process.h" |
| 9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
| 10 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 void PepperHungPluginFilter::EndBlockOnSyncMessage() { | 50 void PepperHungPluginFilter::EndBlockOnSyncMessage() { |
| 51 base::AutoLock lock(lock_); | 51 base::AutoLock lock(lock_); |
| 52 pending_sync_message_count_--; | 52 pending_sync_message_count_--; |
| 53 DCHECK(pending_sync_message_count_ >= 0); | 53 DCHECK(pending_sync_message_count_ >= 0); |
| 54 | 54 |
| 55 MayHaveBecomeUnhung(); | 55 MayHaveBecomeUnhung(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void PepperHungPluginFilter::OnFilterAdded(IPC::Channel* channel) {} | 58 void PepperHungPluginFilter::OnFilterAdded(IPC::Sender* sender) {} |
| 59 | 59 |
| 60 void PepperHungPluginFilter::OnFilterRemoved() { | 60 void PepperHungPluginFilter::OnFilterRemoved() { |
| 61 base::AutoLock lock(lock_); | 61 base::AutoLock lock(lock_); |
| 62 MayHaveBecomeUnhung(); | 62 MayHaveBecomeUnhung(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void PepperHungPluginFilter::OnChannelError() { | 65 void PepperHungPluginFilter::OnChannelError() { |
| 66 base::AutoLock lock(lock_); | 66 base::AutoLock lock(lock_); |
| 67 MayHaveBecomeUnhung(); | 67 MayHaveBecomeUnhung(); |
| 68 } | 68 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 hung_plugin_showing_ = true; | 150 hung_plugin_showing_ = true; |
| 151 SendHungMessage(true); | 151 SendHungMessage(true); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void PepperHungPluginFilter::SendHungMessage(bool is_hung) { | 154 void PepperHungPluginFilter::SendHungMessage(bool is_hung) { |
| 155 filter_->Send(new FrameHostMsg_PepperPluginHung( | 155 filter_->Send(new FrameHostMsg_PepperPluginHung( |
| 156 frame_routing_id_, plugin_child_id_, plugin_path_, is_hung)); | 156 frame_routing_id_, plugin_child_id_, plugin_path_, is_hung)); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace content | 159 } // namespace content |
| OLD | NEW |