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

Side by Side Diff: content/browser/android/in_process_surface_texture_manager.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/browser/android/in_process_surface_texture_manager.h" 5 #include "content/browser/android/in_process_surface_texture_manager.h"
6 6
7 #include <android/native_window.h> 7 #include <android/native_window.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/containers/scoped_ptr_hash_map.h" 11 #include "base/containers/scoped_ptr_hash_map.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "content/browser/media/android/browser_media_player_manager.h" 13 #include "content/browser/media/android/browser_media_player_manager.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 // static 18 // static
19 InProcessSurfaceTextureManager* InProcessSurfaceTextureManager::GetInstance() { 19 InProcessSurfaceTextureManager* InProcessSurfaceTextureManager::GetInstance() {
20 return Singleton<InProcessSurfaceTextureManager, 20 return base::Singleton<
21 LeakySingletonTraits<InProcessSurfaceTextureManager>>::get(); 21 InProcessSurfaceTextureManager,
22 base::LeakySingletonTraits<InProcessSurfaceTextureManager>>::get();
22 } 23 }
23 24
24 void InProcessSurfaceTextureManager::RegisterSurfaceTexture( 25 void InProcessSurfaceTextureManager::RegisterSurfaceTexture(
25 int surface_texture_id, 26 int surface_texture_id,
26 int client_id, 27 int client_id,
27 gfx::SurfaceTexture* surface_texture) { 28 gfx::SurfaceTexture* surface_texture) {
28 base::AutoLock lock(lock_); 29 base::AutoLock lock(lock_);
29 30
30 DCHECK(surface_textures_.find(surface_texture_id) == surface_textures_.end()); 31 DCHECK(surface_textures_.find(surface_texture_id) == surface_textures_.end());
31 surface_textures_.add( 32 surface_textures_.add(
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 70
70 InProcessSurfaceTextureManager::InProcessSurfaceTextureManager() { 71 InProcessSurfaceTextureManager::InProcessSurfaceTextureManager() {
71 SurfaceTexturePeer::InitInstance(this); 72 SurfaceTexturePeer::InitInstance(this);
72 } 73 }
73 74
74 InProcessSurfaceTextureManager::~InProcessSurfaceTextureManager() { 75 InProcessSurfaceTextureManager::~InProcessSurfaceTextureManager() {
75 SurfaceTexturePeer::InitInstance(nullptr); 76 SurfaceTexturePeer::InitInstance(nullptr);
76 } 77 }
77 78
78 } // namespace content 79 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/in_process_surface_texture_manager.h ('k') | content/browser/bootstrap_sandbox_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698