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

Side by Side Diff: ui/base/test/windowed_nsnotification_observer.h

Issue 1146873002: [MacViews] Enable dragging a window by its caption/draggable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 5 years, 6 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/BUILD.gn ('k') | ui/base/test/windowed_nsnotification_observer.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_BASE_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_
6 #define UI_BASE_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_
7
8 #import <Foundation/Foundation.h>
9
10 #import "base/mac/scoped_nsobject.h"
11
12 namespace base {
13 class RunLoop;
14 }
15
16 // Like WindowedNotificationObserver in content/public/test/test_utils.h, this
17 // starts watching for a notification upon construction and can wait until the
18 // notification is observed. This guarantees that a notification fired between
19 // calls to init and wait will be caught.
20 @interface WindowedNSNotificationObserver : NSObject {
21 @private
22 base::scoped_nsobject<NSString> bundleId_;
23 BOOL notificationReceived_;
24 base::RunLoop* runLoop_;
25 }
26
27 // Watch for an NSNotification on the default notification center.
28 - (id)initForNotification:(NSString*)name;
29
30 // Watch for an NSNotification on the shared workspace notification center for
31 // the
32 // given application.
33 - (id)initForWorkspaceNotification:(NSString*)name bundleId:(NSString*)bundleId;
34
35 // Returns if the notification has been observed, or spins a RunLoop until it
36 // is. Stops observing.
37 - (void)wait;
38 @end
39
40 #endif // UI_BASE_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/test/windowed_nsnotification_observer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698