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

Side by Side Diff: content/common/np_channel_base.h

Issue 11235068: Move the remaning files in content\common to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/common/message_router.cc ('k') | content/common/np_channel_base.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 #ifndef CONTENT_COMMON_NP_CHANNEL_BASE_H_ 5 #ifndef CONTENT_COMMON_NP_CHANNEL_BASE_H_
6 #define CONTENT_COMMON_NP_CHANNEL_BASE_H_ 6 #define CONTENT_COMMON_NP_CHANNEL_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 namespace stdext { 37 namespace stdext {
38 38
39 template<> 39 template<>
40 inline size_t hash_value(NPObject* const& ptr) { 40 inline size_t hash_value(NPObject* const& ptr) {
41 return hash_value(reinterpret_cast<size_t>(ptr)); 41 return hash_value(reinterpret_cast<size_t>(ptr));
42 } 42 }
43 43
44 } // namespace stdext 44 } // namespace stdext
45 #endif // COMPILER 45 #endif // COMPILER
46 46
47 namespace content {
48
47 // Encapsulates an IPC channel between a renderer and another process. Used to 49 // Encapsulates an IPC channel between a renderer and another process. Used to
48 // proxy access to NP objects. 50 // proxy access to NP objects.
49 class NPChannelBase : public IPC::Listener, 51 class NPChannelBase : public IPC::Listener,
50 public IPC::Sender, 52 public IPC::Sender,
51 public base::RefCountedThreadSafe<NPChannelBase> { 53 public base::RefCountedThreadSafe<NPChannelBase> {
52 public: 54 public:
53 55
54 // WebPlugin[Delegate] call these on construction and destruction to setup 56 // WebPlugin[Delegate] call these on construction and destruction to setup
55 // the routing and manage lifetime of this object (they pass NULL for 57 // the routing and manage lifetime of this object (they pass NULL for
56 // npobject). These are also called by NPObjectProxy and NPObjectStub (which 58 // npobject). These are also called by NPObjectProxy and NPObjectStub (which
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // However to avoid deadlock, we must ensure that any message that's sent as 193 // However to avoid deadlock, we must ensure that any message that's sent as
192 // a result of a sync call from the renderer must unblock the renderer. We 194 // a result of a sync call from the renderer must unblock the renderer. We
193 // additionally have to do this for async messages from the renderer that 195 // additionally have to do this for async messages from the renderer that
194 // have the unblock flag set, since they could be followed by a sync message 196 // have the unblock flag set, since they could be followed by a sync message
195 // that won't get dispatched until the call to the renderer is complete. 197 // that won't get dispatched until the call to the renderer is complete.
196 bool send_unblocking_only_during_unblock_dispatch_; 198 bool send_unblocking_only_during_unblock_dispatch_;
197 199
198 DISALLOW_COPY_AND_ASSIGN(NPChannelBase); 200 DISALLOW_COPY_AND_ASSIGN(NPChannelBase);
199 }; 201 };
200 202
203 } // namespace content
204
201 #endif // CONTENT_COMMON_NP_CHANNEL_BASE_H_ 205 #endif // CONTENT_COMMON_NP_CHANNEL_BASE_H_
OLDNEW
« no previous file with comments | « content/common/message_router.cc ('k') | content/common/np_channel_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698