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

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

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, 1 month 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/np_channel_base.h ('k') | content/common/npobject_base.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/common/np_channel_base.h" 5 #include "content/common/np_channel_base.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
13 #include "ipc/ipc_sync_message.h" 13 #include "ipc/ipc_sync_message.h"
14 14
15 #if defined(OS_POSIX) 15 #if defined(OS_POSIX)
16 #include "ipc/ipc_channel_posix.h" 16 #include "ipc/ipc_channel_posix.h"
17 #endif 17 #endif
18 18
19 namespace content {
20
19 typedef base::hash_map<std::string, scoped_refptr<NPChannelBase> > ChannelMap; 21 typedef base::hash_map<std::string, scoped_refptr<NPChannelBase> > ChannelMap;
20 static base::LazyInstance<ChannelMap>::Leaky 22 static base::LazyInstance<ChannelMap>::Leaky
21 g_channels = LAZY_INSTANCE_INITIALIZER; 23 g_channels = LAZY_INSTANCE_INITIALIZER;
22 24
23 typedef std::stack<scoped_refptr<NPChannelBase> > NPChannelRefStack; 25 typedef std::stack<scoped_refptr<NPChannelBase> > NPChannelRefStack;
24 static base::LazyInstance<NPChannelRefStack>::Leaky 26 static base::LazyInstance<NPChannelRefStack>::Leaky
25 g_lazy_channel_stack = LAZY_INSTANCE_INITIALIZER; 27 g_lazy_channel_stack = LAZY_INSTANCE_INITIALIZER;
26 28
27 NPChannelBase* NPChannelBase::GetChannel( 29 NPChannelBase* NPChannelBase::GetChannel(
28 const IPC::ChannelHandle& channel_handle, IPC::Channel::Mode mode, 30 const IPC::ChannelHandle& channel_handle, IPC::Channel::Mode mode,
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 295
294 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id, 296 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id,
295 NPObject* object) { 297 NPObject* object) {
296 DCHECK(object != NULL); 298 DCHECK(object != NULL);
297 stub_map_.erase(object); 299 stub_map_.erase(object);
298 } 300 }
299 301
300 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { 302 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) {
301 proxy_map_.erase(route_id); 303 proxy_map_.erase(route_id);
302 } 304 }
305
306 } // namespace content
OLDNEW
« no previous file with comments | « content/common/np_channel_base.h ('k') | content/common/npobject_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698