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

Side by Side Diff: content/browser/in_process_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
« no previous file with comments | « content/browser/in_process_io_surface_manager_mac.h ('k') | content/browser/mach_broker_mac.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 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/browser/in_process_io_surface_manager_mac.h" 5 #include "content/browser/in_process_io_surface_manager_mac.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 // static 11 // static
12 InProcessIOSurfaceManager* InProcessIOSurfaceManager::GetInstance() { 12 InProcessIOSurfaceManager* InProcessIOSurfaceManager::GetInstance() {
13 return Singleton<InProcessIOSurfaceManager, 13 return base::Singleton<
14 LeakySingletonTraits<InProcessIOSurfaceManager>>::get(); 14 InProcessIOSurfaceManager,
15 base::LeakySingletonTraits<InProcessIOSurfaceManager>>::get();
15 } 16 }
16 17
17 bool InProcessIOSurfaceManager::RegisterIOSurface(IOSurfaceId io_surface_id, 18 bool InProcessIOSurfaceManager::RegisterIOSurface(IOSurfaceId io_surface_id,
18 int client_id, 19 int client_id,
19 IOSurfaceRef io_surface) { 20 IOSurfaceRef io_surface) {
20 base::AutoLock lock(lock_); 21 base::AutoLock lock(lock_);
21 22
22 DCHECK(io_surfaces_.find(io_surface_id) == io_surfaces_.end()); 23 DCHECK(io_surfaces_.find(io_surface_id) == io_surfaces_.end());
23 io_surfaces_.add(io_surface_id, 24 io_surfaces_.add(io_surface_id,
24 make_scoped_ptr(new base::mac::ScopedMachSendRight( 25 make_scoped_ptr(new base::mac::ScopedMachSendRight(
(...skipping 17 matching lines...) Expand all
42 return IOSurfaceLookupFromMachPort(io_surfaces_.get(io_surface_id)->get()); 43 return IOSurfaceLookupFromMachPort(io_surfaces_.get(io_surface_id)->get());
43 } 44 }
44 45
45 InProcessIOSurfaceManager::InProcessIOSurfaceManager() { 46 InProcessIOSurfaceManager::InProcessIOSurfaceManager() {
46 } 47 }
47 48
48 InProcessIOSurfaceManager::~InProcessIOSurfaceManager() { 49 InProcessIOSurfaceManager::~InProcessIOSurfaceManager() {
49 } 50 }
50 51
51 } // namespace content 52 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/in_process_io_surface_manager_mac.h ('k') | content/browser/mach_broker_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698