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

Unified Diff: ui/base/test/nswindow_fullscreen_notification_waiter.h

Issue 1109493002: [MacViews] Fix behavior of non-resizable windows in fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to Patch Set 7 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
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/test/nswindow_fullscreen_notification_waiter.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/test/nswindow_fullscreen_notification_waiter.h
diff --git a/ui/base/test/nswindow_fullscreen_notification_waiter.h b/ui/base/test/nswindow_fullscreen_notification_waiter.h
new file mode 100644
index 0000000000000000000000000000000000000000..340dbb7b08d8d568f403677d31981ccead8ee9ea
--- /dev/null
+++ b/ui/base/test/nswindow_fullscreen_notification_waiter.h
@@ -0,0 +1,36 @@
+// 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_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_
+#define UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#import "base/mac/scoped_nsobject.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/run_loop.h"
+
+// Waits for fullscreen transitions to complete.
+@interface NSWindowFullscreenNotificationWaiter : NSObject {
+ @private
+ scoped_ptr<base::RunLoop> runLoop_;
+ base::scoped_nsobject<NSWindow> window_;
+ int enterCount_;
+ int exitCount_;
+ int targetEnterCount_;
+ int targetExitCount_;
+}
+
+@property(readonly, nonatomic) int enterCount;
+@property(readonly, nonatomic) int exitCount;
+
+// Initialize for the given window and start tracking notifications.
+- (id)initWithWindow:(NSWindow*)window;
+
+// Keep spinning a run loop until the enter and exit counts match.
+- (void)waitForEnterCount:(int)enterCount exitCount:(int)exitCount;
+
+@end
+
+#endif // UI_BASE_TEST_NSWINDOW_FULLSCREEN_NOTIFICATION_WAITER_H_
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/test/nswindow_fullscreen_notification_waiter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698