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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 (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_process_host_ui_shim.h" 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 22 matching lines...) Expand all
33 33
34 namespace content { 34 namespace content {
35 35
36 namespace { 36 namespace {
37 37
38 // One of the linux specific headers defines this as a macro. 38 // One of the linux specific headers defines this as a macro.
39 #ifdef DestroyAll 39 #ifdef DestroyAll
40 #undef DestroyAll 40 #undef DestroyAll
41 #endif 41 #endif
42 42
43 base::LazyInstance<IDMap<GpuProcessHostUIShim*>> g_hosts_by_id = 43 base::LazyInstance<IDMap<GpuProcessHostUIShim*>>::DestructorAtExit
44 LAZY_INSTANCE_INITIALIZER; 44 g_hosts_by_id = LAZY_INSTANCE_INITIALIZER;
45 45
46 void StopGpuProcessOnIO(int host_id) { 46 void StopGpuProcessOnIO(int host_id) {
47 GpuProcessHost* host = GpuProcessHost::FromID(host_id); 47 GpuProcessHost* host = GpuProcessHost::FromID(host_id);
48 if (host) 48 if (host)
49 host->StopGpuProcess(); 49 host->StopGpuProcess();
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 53
54 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg) { 54 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void GpuProcessHostUIShim::OnGraphicsInfoCollected( 161 void GpuProcessHostUIShim::OnGraphicsInfoCollected(
162 const gpu::GPUInfo& gpu_info) { 162 const gpu::GPUInfo& gpu_info) {
163 // OnGraphicsInfoCollected is sent back after the GPU process successfully 163 // OnGraphicsInfoCollected is sent back after the GPU process successfully
164 // initializes GL. 164 // initializes GL.
165 TRACE_EVENT0("test_gpu", "OnGraphicsInfoCollected"); 165 TRACE_EVENT0("test_gpu", "OnGraphicsInfoCollected");
166 166
167 GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info); 167 GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info);
168 } 168 }
169 169
170 } // namespace content 170 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/browser/indexed_db/indexed_db_class_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698