Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1254)

Side by Side Diff: content/renderer/pepper/pepper_hung_plugin_filter.cc

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/pepper/pepper_hung_plugin_filter.h ('k') | ipc/ipc_channel_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_hung_plugin_filter.h ('k') | ipc/ipc_channel_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698