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

Side by Side Diff: ui/gl/gpu_switching_manager.h

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
« no previous file with comments | « ui/gfx/win/window_impl.cc ('k') | ui/gl/gpu_switching_manager.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 #ifndef UI_GL_GPU_SWITCHING_MANAGER_H_ 5 #ifndef UI_GL_GPU_SWITCHING_MANAGER_H_
6 #define UI_GL_GPU_SWITCHING_MANAGER_H_ 6 #define UI_GL_GPU_SWITCHING_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void RemoveObserver(GpuSwitchingObserver* observer); 44 void RemoveObserver(GpuSwitchingObserver* observer);
45 45
46 // Called when a GPU switch is noticed by the system. In the browser process 46 // Called when a GPU switch is noticed by the system. In the browser process
47 // this is occurs as a result of a system observer. In the GPU process, this 47 // this is occurs as a result of a system observer. In the GPU process, this
48 // occurs as a result of an IPC from the browser. The system observer is kept 48 // occurs as a result of an IPC from the browser. The system observer is kept
49 // in the browser process only so that any workarounds or blacklisting can 49 // in the browser process only so that any workarounds or blacklisting can
50 // be applied there. 50 // be applied there.
51 void NotifyGpuSwitched(); 51 void NotifyGpuSwitched();
52 52
53 private: 53 private:
54 friend struct DefaultSingletonTraits<GpuSwitchingManager>; 54 friend struct base::DefaultSingletonTraits<GpuSwitchingManager>;
55 55
56 GpuSwitchingManager(); 56 GpuSwitchingManager();
57 virtual ~GpuSwitchingManager(); 57 virtual ~GpuSwitchingManager();
58 58
59 #if defined(OS_MACOSX) 59 #if defined(OS_MACOSX)
60 void SwitchToDiscreteGpuMac(); 60 void SwitchToDiscreteGpuMac();
61 #endif // OS_MACOSX 61 #endif // OS_MACOSX
62 62
63 gfx::GpuPreference gpu_switching_option_; 63 gfx::GpuPreference gpu_switching_option_;
64 bool gpu_switching_option_set_; 64 bool gpu_switching_option_set_;
65 65
66 std::vector<uint32> vendor_ids_; 66 std::vector<uint32> vendor_ids_;
67 67
68 bool supports_dual_gpus_; 68 bool supports_dual_gpus_;
69 bool supports_dual_gpus_set_; 69 bool supports_dual_gpus_set_;
70 70
71 struct PlatformSpecific; 71 struct PlatformSpecific;
72 scoped_ptr<PlatformSpecific> platform_specific_; 72 scoped_ptr<PlatformSpecific> platform_specific_;
73 73
74 base::ObserverList<GpuSwitchingObserver> observer_list_; 74 base::ObserverList<GpuSwitchingObserver> observer_list_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(GpuSwitchingManager); 76 DISALLOW_COPY_AND_ASSIGN(GpuSwitchingManager);
77 }; 77 };
78 78
79 } // namespace ui 79 } // namespace ui
80 80
81 #endif // UI_GL_GPU_SWITCHING_MANAGER_H_ 81 #endif // UI_GL_GPU_SWITCHING_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/gfx/win/window_impl.cc ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698