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

Side by Side Diff: chrome/browser/chromeos/volume_bubble.h

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_
6 #define CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ 6 #define CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/singleton.h" 9 #include "base/singleton.h"
joth 2010/12/09 15:06:40 remove, fwd declare traits
10 #include "chrome/browser/chromeos/setting_level_bubble.h" 10 #include "chrome/browser/chromeos/setting_level_bubble.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 // Singleton class controlling volume bubble. 14 // Singleton class controlling volume bubble.
15 class VolumeBubble : public SettingLevelBubble { 15 class VolumeBubble : public SettingLevelBubble {
16 public: 16 public:
17 static VolumeBubble* instance() { 17 static VolumeBubble* instance();
18 return Singleton<VolumeBubble>::get();
19 }
joth 2010/12/09 15:06:40 this style is going to be very hard to stop creepi
20 18
21 private: 19 private:
22 friend struct DefaultSingletonTraits<VolumeBubble>; 20 friend struct DefaultSingletonTraits<VolumeBubble>;
23 21
24 VolumeBubble(); 22 VolumeBubble();
25 virtual ~VolumeBubble() {} 23 virtual ~VolumeBubble() {}
26 24
27 DISALLOW_COPY_AND_ASSIGN(VolumeBubble); 25 DISALLOW_COPY_AND_ASSIGN(VolumeBubble);
28 }; 26 };
29 27
30 } // namespace chromeos 28 } // namespace chromeos
31 29
32 #endif // CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ 30 #endif // CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698