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

Side by Side Diff: content/browser/gpu/gpu_surface_tracker.cc

Issue 11225045: Move a bunch of content\common code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/gpu/gpu_surface_tracker.h ('k') | content/browser/plugin_service_impl.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gpu/gpu_surface_tracker.h" 5 #include "content/browser/gpu/gpu_surface_tracker.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content {
10
9 GpuSurfaceTracker::GpuSurfaceTracker() 11 GpuSurfaceTracker::GpuSurfaceTracker()
10 : next_surface_id_(1) { 12 : next_surface_id_(1) {
11 GpuSurfaceLookup::InitInstance(this); 13 GpuSurfaceLookup::InitInstance(this);
12 } 14 }
13 15
14 GpuSurfaceTracker::~GpuSurfaceTracker() { 16 GpuSurfaceTracker::~GpuSurfaceTracker() {
15 GpuSurfaceLookup::InitInstance(NULL); 17 GpuSurfaceLookup::InitInstance(NULL);
16 } 18 }
17 19
18 GpuSurfaceTracker* GpuSurfaceTracker::GetInstance() { 20 GpuSurfaceTracker* GpuSurfaceTracker::GetInstance() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return it->second.handle.handle; 99 return it->second.handle.handle;
98 } 100 }
99 101
100 gfx::AcceleratedWidget GpuSurfaceTracker::GetNativeWidget(int surface_id) { 102 gfx::AcceleratedWidget GpuSurfaceTracker::GetNativeWidget(int surface_id) {
101 base::AutoLock lock(lock_); 103 base::AutoLock lock(lock_);
102 SurfaceMap::iterator it = surface_map_.find(surface_id); 104 SurfaceMap::iterator it = surface_map_.find(surface_id);
103 if (it == surface_map_.end()) 105 if (it == surface_map_.end())
104 return gfx::kNullAcceleratedWidget; 106 return gfx::kNullAcceleratedWidget;
105 return it->second.native_widget; 107 return it->second.native_widget;
106 } 108 }
109
110 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_surface_tracker.h ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698