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

Side by Side Diff: content/browser/renderer_host/java/java_bridge_channel_host.cc

Issue 11343017: Move remaining files in content\browser\renderer_host to content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/renderer_host/java/java_bridge_channel_host.h" 5 #include "content/browser/renderer_host/java/java_bridge_channel_host.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
11 #include "content/common/java_bridge_messages.h" 11 #include "content/common/java_bridge_messages.h"
12 12
13 using base::WaitableEvent; 13 using base::WaitableEvent;
14 14
15 namespace content {
15 namespace { 16 namespace {
16 struct WaitableEventLazyInstanceTraits 17 struct WaitableEventLazyInstanceTraits
17 : public base::DefaultLazyInstanceTraits<WaitableEvent> { 18 : public base::DefaultLazyInstanceTraits<WaitableEvent> {
18 static WaitableEvent* New(void* instance) { 19 static WaitableEvent* New(void* instance) {
19 // Use placement new to initialize our instance in our preallocated space. 20 // Use placement new to initialize our instance in our preallocated space.
20 // The parenthesis is very important here to force POD type initialization. 21 // The parenthesis is very important here to force POD type initialization.
21 return new (instance) WaitableEvent(false, false); 22 return new (instance) WaitableEvent(false, false);
22 } 23 }
23 }; 24 };
24 base::LazyInstance<WaitableEvent, WaitableEventLazyInstanceTraits> dummy_event = 25 base::LazyInstance<WaitableEvent, WaitableEventLazyInstanceTraits> dummy_event =
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool handled = true; 74 bool handled = true;
74 IPC_BEGIN_MESSAGE_MAP(JavaBridgeChannelHost, message) 75 IPC_BEGIN_MESSAGE_MAP(JavaBridgeChannelHost, message)
75 IPC_MESSAGE_HANDLER(JavaBridgeMsg_GenerateRouteID, OnGenerateRouteID) 76 IPC_MESSAGE_HANDLER(JavaBridgeMsg_GenerateRouteID, OnGenerateRouteID)
76 IPC_END_MESSAGE_MAP() 77 IPC_END_MESSAGE_MAP()
77 return handled; 78 return handled;
78 } 79 }
79 80
80 void JavaBridgeChannelHost::OnGenerateRouteID(int* route_id) { 81 void JavaBridgeChannelHost::OnGenerateRouteID(int* route_id) {
81 *route_id = GenerateRouteID(); 82 *route_id = GenerateRouteID();
82 } 83 }
84
85 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698