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_ |
| 6 #define UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_ |
| 7 |
| 8 #import <Cocoa/Cocoa.h> |
| 9 |
| 10 #import "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/run_loop.h" |
| 13 |
| 14 // Watches for NSNotifications. |
| 15 @interface WindowedNSNotificationObserver : NSObject { |
| 16 @private |
| 17 base::scoped_nsobject<NSString> bundleId_; |
| 18 BOOL notificationReceived_; |
| 19 scoped_ptr<base::RunLoop> runLoop_; |
| 20 } |
| 21 |
| 22 // Watch for a notification on the default notification center. |
| 23 - (id)initForNotification:(NSString*)name; |
| 24 // Watch for a notification on the shared workspace notification center for the |
| 25 // given application. |
| 26 - (id)initForNotification:(NSString*)name |
| 27 andBundleId:(NSString*)bundleId; |
| 28 - (void)wait; |
| 29 @end |
| 30 |
| 31 #endif // UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_ |
| 32 |
OLD | NEW |