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

Side by Side Diff: content/child/child_io_surface_manager_mac.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/child/child_io_surface_manager_mac.h" 5 #include "content/child/child_io_surface_manager_mac.h"
6 6
7 #include "base/mac/mach_logging.h" 7 #include "base/mac/mach_logging.h"
8 #include "content/common/mac/io_surface_manager_messages.h" 8 #include "content/common/mac/io_surface_manager_messages.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // static 12 // static
13 ChildIOSurfaceManager* ChildIOSurfaceManager::GetInstance() { 13 ChildIOSurfaceManager* ChildIOSurfaceManager::GetInstance() {
14 return Singleton<ChildIOSurfaceManager, 14 return base::Singleton<
15 LeakySingletonTraits<ChildIOSurfaceManager>>::get(); 15 ChildIOSurfaceManager,
16 base::LeakySingletonTraits<ChildIOSurfaceManager>>::get();
16 } 17 }
17 18
18 bool ChildIOSurfaceManager::RegisterIOSurface(IOSurfaceId io_surface_id, 19 bool ChildIOSurfaceManager::RegisterIOSurface(IOSurfaceId io_surface_id,
19 int client_id, 20 int client_id,
20 IOSurfaceRef io_surface) { 21 IOSurfaceRef io_surface) {
21 DCHECK(service_port_.is_valid()); 22 DCHECK(service_port_.is_valid());
22 DCHECK(!token_.IsZero()); 23 DCHECK(!token_.IsZero());
23 24
24 mach_port_t reply_port; 25 mach_port_t reply_port;
25 kern_return_t kr = mach_port_allocate(mach_task_self(), 26 kern_return_t kr = mach_port_allocate(mach_task_self(),
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 data.reply.msg.io_surface_port.name); 134 data.reply.msg.io_surface_port.name);
134 135
135 return IOSurfaceLookupFromMachPort(scoped_io_surface_right); 136 return IOSurfaceLookupFromMachPort(scoped_io_surface_right);
136 } 137 }
137 138
138 ChildIOSurfaceManager::ChildIOSurfaceManager() {} 139 ChildIOSurfaceManager::ChildIOSurfaceManager() {}
139 140
140 ChildIOSurfaceManager::~ChildIOSurfaceManager() {} 141 ChildIOSurfaceManager::~ChildIOSurfaceManager() {}
141 142
142 } // namespace content 143 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_io_surface_manager_mac.h ('k') | content/common/font_cache_dispatcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698