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

Side by Side Diff: content/renderer/plugin_channel_host.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 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/plugin_channel_host.h ('k') | content/renderer/render_process.h » ('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/plugin_channel_host.h" 5 #include "content/renderer/plugin_channel_host.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "content/common/child_process.h" 9 #include "content/common/child_process.h"
10 #include "content/common/npobject_base.h" 10 #include "content/common/npobject_base.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // GetRemoveTrackingFlag() exposes this so that 42 // GetRemoveTrackingFlag() exposes this so that
43 // WebPluginDelegateProxy::Initialize() can do scoped set/reset. When 43 // WebPluginDelegateProxy::Initialize() can do scoped set/reset. When
44 // true, RemoveRoute() knows WBDP::Initialize() is on the stack, and 44 // true, RemoveRoute() knows WBDP::Initialize() is on the stack, and
45 // records the backtrace. 45 // records the backtrace.
46 bool remove_tracking = false; 46 bool remove_tracking = false;
47 47
48 } // namespace 48 } // namespace
49 #endif 49 #endif
50 50
51 namespace content {
52
51 // A simple MessageFilter that will ignore all messages and respond to sync 53 // A simple MessageFilter that will ignore all messages and respond to sync
52 // messages with an error when is_listening_ is false. 54 // messages with an error when is_listening_ is false.
53 class IsListeningFilter : public IPC::ChannelProxy::MessageFilter { 55 class IsListeningFilter : public IPC::ChannelProxy::MessageFilter {
54 public: 56 public:
55 IsListeningFilter() : channel_(NULL) {} 57 IsListeningFilter() : channel_(NULL) {}
56 58
57 // MessageFilter overrides 59 // MessageFilter overrides
58 virtual void OnFilterRemoved() {} 60 virtual void OnFilterRemoved() {}
59 virtual void OnFilterAdded(IPC::Channel* channel) { channel_ = channel; } 61 virtual void OnFilterAdded(IPC::Channel* channel) { channel_ = channel; }
60 virtual bool OnMessageReceived(const IPC::Message& message); 62 virtual bool OnMessageReceived(const IPC::Message& message);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 221
220 NPChannelBase::OnChannelError(); 222 NPChannelBase::OnChannelError();
221 223
222 for (ProxyMap::iterator iter = proxies_.begin(); 224 for (ProxyMap::iterator iter = proxies_.begin();
223 iter != proxies_.end(); iter++) { 225 iter != proxies_.end(); iter++) {
224 iter->second->OnChannelError(); 226 iter->second->OnChannelError();
225 } 227 }
226 228
227 proxies_.clear(); 229 proxies_.clear();
228 } 230 }
231
232 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/plugin_channel_host.h ('k') | content/renderer/render_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698