OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/gpu/gpu_mode_manager.h" | 5 #include "chrome/browser/gpu/gpu_mode_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 content::GpuDataManager::GetInstance(); | 31 content::GpuDataManager::GetInstance(); |
32 DCHECK(gpu_data_manager); | 32 DCHECK(gpu_data_manager); |
33 gpu_data_manager->DisableHardwareAcceleration(); | 33 gpu_data_manager->DisableHardwareAcceleration(); |
34 } | 34 } |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
38 GpuModeManager::~GpuModeManager() { | 38 GpuModeManager::~GpuModeManager() { |
39 } | 39 } |
40 | 40 |
41 bool GpuModeManager::IsGpuModePrefEnabled() const { | 41 // static |
| 42 bool GpuModeManager::IsGpuModePrefEnabled() { |
42 PrefService* service = g_browser_process->local_state(); | 43 PrefService* service = g_browser_process->local_state(); |
43 DCHECK(service); | 44 DCHECK(service); |
44 return service->GetBoolean( | 45 return service->GetBoolean( |
45 prefs::kHardwareAccelerationModeEnabled); | 46 prefs::kHardwareAccelerationModeEnabled); |
46 } | 47 } |
47 | 48 |
OLD | NEW |