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

Side by Side Diff: ui/base/test/scoped_preferred_scroller_style_mac.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TEST_SCOPED_PREFERRED_SCROLLER_STYLE_LEGACY_MAC_H_ 5 #ifndef UI_BASE_TEST_SCOPED_PREFERRED_SCROLLER_STYLE_LEGACY_MAC_H_
6 #define UI_BASE_TEST_SCOPED_PREFERRED_SCROLLER_STYLE_LEGACY_MAC_H_ 6 #define UI_BASE_TEST_SCOPED_PREFERRED_SCROLLER_STYLE_LEGACY_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 11
11 namespace base { 12 namespace base {
12 namespace mac { 13 namespace mac {
13 class ScopedObjCClassSwizzler; 14 class ScopedObjCClassSwizzler;
14 } 15 }
15 } 16 }
16 17
17 namespace ui { 18 namespace ui {
18 namespace test { 19 namespace test {
19 20
20 // Overrides system setting for scrollbar style with NSScrollerOverlay if we 21 // Overrides system setting for scrollbar style with NSScrollerOverlay if we
21 // want the scrollbar to overlay. Otherwise, override with 22 // want the scrollbar to overlay. Otherwise, override with
22 // NSScrollerStyleLegacy which means "always show scrollbars". 23 // NSScrollerStyleLegacy which means "always show scrollbars".
23 class ScopedPreferredScrollerStyle { 24 class ScopedPreferredScrollerStyle {
24 public: 25 public:
25 explicit ScopedPreferredScrollerStyle(bool overlay); 26 explicit ScopedPreferredScrollerStyle(bool overlay);
26 ~ScopedPreferredScrollerStyle(); 27 ~ScopedPreferredScrollerStyle();
27 28
28 private: 29 private:
29 scoped_ptr<base::mac::ScopedObjCClassSwizzler> swizzler_; 30 std::unique_ptr<base::mac::ScopedObjCClassSwizzler> swizzler_;
30 31
31 // True if the scrollbar style should overlay. 32 // True if the scrollbar style should overlay.
32 bool overlay_; 33 bool overlay_;
33 34
34 DISALLOW_COPY_AND_ASSIGN(ScopedPreferredScrollerStyle); 35 DISALLOW_COPY_AND_ASSIGN(ScopedPreferredScrollerStyle);
35 }; 36 };
36 37
37 } // namespace test 38 } // namespace test
38 } // namespace ui 39 } // namespace ui
39 40
40 #endif // UI_BASE_TEST_SCOPED_PREFERRED_SCROLLER_STYLE_LEGACY_MAC_H_ 41 #endif // UI_BASE_TEST_SCOPED_PREFERRED_SCROLLER_STYLE_LEGACY_MAC_H_
OLDNEW
« no previous file with comments | « ui/base/test/scoped_fake_nswindow_fullscreen.h ('k') | ui/base/user_activity/user_activity_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698