OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_ | |
tapted
2015/06/03 07:04:48
UI_GFX_TEST -> UI_BASE_TEST
jackhou1
2015/06/03 08:13:50
Done.
| |
6 #define UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_ | |
7 | |
8 #import <Cocoa/Cocoa.h> | |
tapted
2015/06/03 07:04:48
This should be <Foundation/Foundation.h> since App
jackhou1
2015/06/03 08:13:51
Done.
| |
9 | |
10 #import "base/mac/scoped_nsobject.h" | |
11 #include "base/memory/scoped_ptr.h" | |
tapted
2015/06/03 07:04:48
nit: not needed (see below)
jackhou1
2015/06/03 08:13:50
Done.
| |
12 #include "base/run_loop.h" | |
tapted
2015/06/03 07:04:48
nit: forward-declare
jackhou1
2015/06/03 08:13:51
Done.
| |
13 | |
14 // Watches for NSNotifications. | |
tapted
2015/06/03 07:04:49
something more verbose? (i.e. "sell" this class -
jackhou1
2015/06/03 08:13:51
Done.
| |
15 @interface WindowedNSNotificationObserver : NSObject { | |
tapted
2015/06/03 07:04:48
Do you know the history behind the "Windowed" pref
jackhou1
2015/06/03 08:13:51
This is the same as WindowedNotificationObserver i
tapted
2015/06/03 09:12:57
aah, sounds good.
| |
16 @private | |
17 base::scoped_nsobject<NSString> bundleId_; | |
18 BOOL notificationReceived_; | |
19 scoped_ptr<base::RunLoop> runLoop_; | |
tapted
2015/06/03 07:04:48
This can just be a raw pointer to base::RunLoop (s
jackhou1
2015/06/03 08:13:51
Done.
| |
20 } | |
21 | |
22 // Watch for a notification on the default notification center. | |
tapted
2015/06/03 07:04:48
nit: "a notification" -> "an NSNotification"
jackhou1
2015/06/03 08:13:51
Done.
| |
23 - (id)initForNotification:(NSString*)name; | |
24 // Watch for a notification on the shared workspace notification center for the | |
tapted
2015/06/03 07:04:48
nit: blank line before
jackhou1
2015/06/03 08:13:51
Done.
| |
25 // given application. | |
26 - (id)initForNotification:(NSString*)name | |
tapted
2015/06/03 07:04:48
maybe `initForWorkspaceNotification`?
jackhou1
2015/06/03 08:13:51
Done.
| |
27 andBundleId:(NSString*)bundleId; | |
tapted
2015/06/03 07:04:48
andBundleId -> bundleId (or maybe `forBundleId` b
jackhou1
2015/06/03 08:13:50
Done.
| |
28 - (void)wait; | |
tapted
2015/06/03 07:04:48
needs a comment. Needs to say stuff like ~immediat
jackhou1
2015/06/03 08:13:51
Done.
| |
29 @end | |
30 | |
31 #endif // UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_ | |
32 | |
tapted
2015/06/03 07:04:48
nit: remove extra blank line
jackhou1
2015/06/03 08:13:51
Done.
| |
OLD | NEW |