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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/test/windowed_nsnotification_observer.h
diff --git a/ui/base/test/windowed_nsnotification_observer.h b/ui/base/test/windowed_nsnotification_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..6cea213740222f46bd10a5ac21fe52ead0535d5f
--- /dev/null
+++ b/ui/base/test/windowed_nsnotification_observer.h
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_
+#define UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#import "base/mac/scoped_nsobject.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/run_loop.h"
+
+// Watches for NSNotifications.
+@interface WindowedNSNotificationObserver : NSObject {
+ @private
+ base::scoped_nsobject<NSString> bundleId_;
+ BOOL notificationReceived_;
+ scoped_ptr<base::RunLoop> runLoop_;
+}
+
+// Watch for a notification on the default notification center.
+- (id)initForNotification:(NSString*)name;
+// Watch for a notification on the shared workspace notification center for the
+// given application.
+- (id)initForNotification:(NSString*)name
+ andBundleId:(NSString*)bundleId;
+- (void)wait;
+@end
+
+#endif // UI_GFX_TEST_WINDOWED_NSNOTIFICATION_OBSERVER_H_
+

Powered by Google App Engine
This is Rietveld 408576698