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

Side by Side Diff: ui/base/accelerators/platform_accelerator_cocoa.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_COCOA_H_ 5 #ifndef UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_COCOA_H_
6 #define UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_COCOA_H_ 6 #define UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_COCOA_H_
7 7
8 #include <Foundation/Foundation.h> 8 #include <Foundation/Foundation.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/base/accelerators/platform_accelerator.h" 12 #include "ui/base/accelerators/platform_accelerator.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 // This is a Mac specific class for specifing accelerator keys. 16 // This is a Mac specific class for specifing accelerator keys.
17 class UI_BASE_EXPORT PlatformAcceleratorCocoa : public PlatformAccelerator { 17 class UI_BASE_EXPORT PlatformAcceleratorCocoa : public PlatformAccelerator {
18 public: 18 public:
19 PlatformAcceleratorCocoa(); 19 PlatformAcceleratorCocoa();
20 PlatformAcceleratorCocoa(NSString* key_code, NSUInteger modifier_mask); 20 PlatformAcceleratorCocoa(NSString* key_code, NSUInteger modifier_mask);
21 ~PlatformAcceleratorCocoa() override; 21 ~PlatformAcceleratorCocoa() override;
22 22
23 // PlatformAccelerator: 23 // PlatformAccelerator:
24 scoped_ptr<PlatformAccelerator> CreateCopy() const override; 24 std::unique_ptr<PlatformAccelerator> CreateCopy() const override;
25 bool Equals(const PlatformAccelerator& rhs) const override; 25 bool Equals(const PlatformAccelerator& rhs) const override;
26 26
27 // The keyEquivalent of the NSMenuItem associated with the accelerator. 27 // The keyEquivalent of the NSMenuItem associated with the accelerator.
28 NSString* characters() const { return characters_.get(); } 28 NSString* characters() const { return characters_.get(); }
29 // The keyEquivalentModifierMask of the NSMenuItem associated with the 29 // The keyEquivalentModifierMask of the NSMenuItem associated with the
30 // accelerator. 30 // accelerator.
31 NSUInteger modifier_mask() const { return modifier_mask_; } 31 NSUInteger modifier_mask() const { return modifier_mask_; }
32 32
33 private: 33 private:
34 // String of characters for the key equivalent. 34 // String of characters for the key equivalent.
35 base::scoped_nsobject<NSString> characters_; 35 base::scoped_nsobject<NSString> characters_;
36 NSUInteger modifier_mask_; 36 NSUInteger modifier_mask_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(PlatformAcceleratorCocoa); 38 DISALLOW_COPY_AND_ASSIGN(PlatformAcceleratorCocoa);
39 }; 39 };
40 40
41 } // namespace ui 41 } // namespace ui
42 42
43 #endif // UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_COCOA_H_ 43 #endif // UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_COCOA_H_
OLDNEW
« no previous file with comments | « ui/base/accelerators/platform_accelerator.h ('k') | ui/base/accelerators/platform_accelerator_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698