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

Side by Side Diff: content/browser/cocoa/system_hotkey_helper_mac.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_ 5 #ifndef CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_
6 #define CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_ 6 #define CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 10
(...skipping 14 matching lines...) Expand all
25 static SystemHotkeyHelperMac* GetInstance(); 25 static SystemHotkeyHelperMac* GetInstance();
26 26
27 // Loads the system hot keys after a brief delay, to reduce file system access 27 // Loads the system hot keys after a brief delay, to reduce file system access
28 // immediately after launch. 28 // immediately after launch.
29 void DeferredLoadSystemHotkeys(); 29 void DeferredLoadSystemHotkeys();
30 30
31 // Guaranteed to not be NULL. 31 // Guaranteed to not be NULL.
32 SystemHotkeyMap* map() { return map_.get(); } 32 SystemHotkeyMap* map() { return map_.get(); }
33 33
34 private: 34 private:
35 friend struct DefaultSingletonTraits<SystemHotkeyHelperMac>; 35 friend struct base::DefaultSingletonTraits<SystemHotkeyHelperMac>;
36 36
37 SystemHotkeyHelperMac(); 37 SystemHotkeyHelperMac();
38 ~SystemHotkeyHelperMac(); 38 ~SystemHotkeyHelperMac();
39 39
40 // Must be called from the FILE thread. Loads the file containing the system 40 // Must be called from the FILE thread. Loads the file containing the system
41 // hotkeys into a NSDictionary* object, and passes the result to FileDidLoad 41 // hotkeys into a NSDictionary* object, and passes the result to FileDidLoad
42 // on the UI thread. 42 // on the UI thread.
43 void LoadSystemHotkeys(); 43 void LoadSystemHotkeys();
44 44
45 // Must be called from the UI thread. This takes ownership of |dictionary|. 45 // Must be called from the UI thread. This takes ownership of |dictionary|.
46 // Parses the system hotkeys from the plist stored in |dictionary|. 46 // Parses the system hotkeys from the plist stored in |dictionary|.
47 void FileDidLoad(NSDictionary* dictionary); 47 void FileDidLoad(NSDictionary* dictionary);
48 48
49 scoped_ptr<SystemHotkeyMap> map_; 49 scoped_ptr<SystemHotkeyMap> map_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(SystemHotkeyHelperMac); 51 DISALLOW_COPY_AND_ASSIGN(SystemHotkeyHelperMac);
52 }; 52 };
53 53
54 } // namespace content 54 } // namespace content
55 55
56 #endif // CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_ 56 #endif // CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_impl.cc ('k') | content/browser/cocoa/system_hotkey_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698