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

Side by Side Diff: content/browser/android/browser_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser_surface_texture_manager.h" 5 #include "content/browser/android/browser_surface_texture_manager.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "content/browser/android/child_process_launcher_android.h" 10 #include "content/browser/android/child_process_launcher_android.h"
11 #include "content/browser/frame_host/render_frame_host_impl.h" 11 #include "content/browser/frame_host/render_frame_host_impl.h"
12 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 12 #include "content/browser/gpu/browser_gpu_channel_host_factory.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 #include "ui/gl/android/scoped_java_surface.h" 15 #include "ui/gl/android/scoped_java_surface.h"
16 #include "ui/gl/android/surface_texture.h" 16 #include "ui/gl/android/surface_texture.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 // static 20 // static
21 BrowserSurfaceTextureManager* BrowserSurfaceTextureManager::GetInstance() { 21 BrowserSurfaceTextureManager* BrowserSurfaceTextureManager::GetInstance() {
22 return Singleton<BrowserSurfaceTextureManager, 22 return base::Singleton<
23 LeakySingletonTraits<BrowserSurfaceTextureManager>>::get(); 23 BrowserSurfaceTextureManager,
24 base::LeakySingletonTraits<BrowserSurfaceTextureManager>>::get();
24 } 25 }
25 26
26 void BrowserSurfaceTextureManager::RegisterSurfaceTexture( 27 void BrowserSurfaceTextureManager::RegisterSurfaceTexture(
27 int surface_texture_id, 28 int surface_texture_id,
28 int client_id, 29 int client_id,
29 gfx::SurfaceTexture* surface_texture) { 30 gfx::SurfaceTexture* surface_texture) {
30 content::CreateSurfaceTextureSurface( 31 content::CreateSurfaceTextureSurface(
31 surface_texture_id, client_id, surface_texture); 32 surface_texture_id, client_id, surface_texture);
32 } 33 }
33 34
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 BrowserSurfaceTextureManager::BrowserSurfaceTextureManager() { 76 BrowserSurfaceTextureManager::BrowserSurfaceTextureManager() {
76 SurfaceTexturePeer::InitInstance(this); 77 SurfaceTexturePeer::InitInstance(this);
77 } 78 }
78 79
79 BrowserSurfaceTextureManager::~BrowserSurfaceTextureManager() { 80 BrowserSurfaceTextureManager::~BrowserSurfaceTextureManager() {
80 SurfaceTexturePeer::InitInstance(nullptr); 81 SurfaceTexturePeer::InitInstance(nullptr);
81 } 82 }
82 83
83 } // namespace content 84 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/browser_surface_texture_manager.h ('k') | content/browser/android/download_controller_android_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698