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

Side by Side Diff: ui/base/test/nswindow_fullscreen_notification_waiter.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
« no previous file with comments | « ui/base/resource/resource_bundle_unittest.cc ('k') | ui/base/test/scoped_fake_nswindow_focus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_ 5 #ifndef UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_
6 #define UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_ 6 #define UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory>
11
10 #import "base/mac/scoped_nsobject.h" 12 #import "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/run_loop.h" 13 #include "base/run_loop.h"
13 14
14 // Waits for fullscreen transitions to complete. 15 // Waits for fullscreen transitions to complete.
15 @interface NSWindowFullscreenNotificationWaiter : NSObject { 16 @interface NSWindowFullscreenNotificationWaiter : NSObject {
16 @private 17 @private
17 scoped_ptr<base::RunLoop> runLoop_; 18 std::unique_ptr<base::RunLoop> runLoop_;
18 base::scoped_nsobject<NSWindow> window_; 19 base::scoped_nsobject<NSWindow> window_;
19 int enterCount_; 20 int enterCount_;
20 int exitCount_; 21 int exitCount_;
21 int targetEnterCount_; 22 int targetEnterCount_;
22 int targetExitCount_; 23 int targetExitCount_;
23 } 24 }
24 25
25 @property(readonly, nonatomic) int enterCount; 26 @property(readonly, nonatomic) int enterCount;
26 @property(readonly, nonatomic) int exitCount; 27 @property(readonly, nonatomic) int exitCount;
27 28
28 // Initialize for the given window and start tracking notifications. 29 // Initialize for the given window and start tracking notifications.
29 - (id)initWithWindow:(NSWindow*)window; 30 - (id)initWithWindow:(NSWindow*)window;
30 31
31 // Keep spinning a run loop until the enter and exit counts match. 32 // Keep spinning a run loop until the enter and exit counts match.
32 - (void)waitForEnterCount:(int)enterCount exitCount:(int)exitCount; 33 - (void)waitForEnterCount:(int)enterCount exitCount:(int)exitCount;
33 34
34 @end 35 @end
35 36
36 #endif // UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_ 37 #endif // UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_unittest.cc ('k') | ui/base/test/scoped_fake_nswindow_focus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698