OLD | NEW |
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 <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 | 13 |
13 #ifdef __OBJC__ | 14 #ifdef __OBJC__ |
14 @class NSDictionary; | 15 @class NSDictionary; |
15 #else | 16 #else |
16 class NSDictionary; | 17 class NSDictionary; |
17 #endif | 18 #endif |
18 | 19 |
19 namespace content { | 20 namespace content { |
(...skipping 21 matching lines...) Expand all Loading... |
41 | 42 |
42 // Must be called from the FILE thread. Loads the file containing the system | 43 // Must be called from the FILE thread. Loads the file containing the system |
43 // hotkeys into a NSDictionary* object, and passes the result to FileDidLoad | 44 // hotkeys into a NSDictionary* object, and passes the result to FileDidLoad |
44 // on the UI thread. | 45 // on the UI thread. |
45 void LoadSystemHotkeys(); | 46 void LoadSystemHotkeys(); |
46 | 47 |
47 // Must be called from the UI thread. This takes ownership of |dictionary|. | 48 // Must be called from the UI thread. This takes ownership of |dictionary|. |
48 // Parses the system hotkeys from the plist stored in |dictionary|. | 49 // Parses the system hotkeys from the plist stored in |dictionary|. |
49 void FileDidLoad(NSDictionary* dictionary); | 50 void FileDidLoad(NSDictionary* dictionary); |
50 | 51 |
51 scoped_ptr<SystemHotkeyMap> map_; | 52 std::unique_ptr<SystemHotkeyMap> map_; |
52 | 53 |
53 DISALLOW_COPY_AND_ASSIGN(SystemHotkeyHelperMac); | 54 DISALLOW_COPY_AND_ASSIGN(SystemHotkeyHelperMac); |
54 }; | 55 }; |
55 | 56 |
56 } // namespace content | 57 } // namespace content |
57 | 58 |
58 #endif // CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_ | 59 #endif // CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_ |
OLD | NEW |