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

Unified Diff: base/test/mock_chrome_application_mac.h

Issue 8724004: [Mac] Move ScopedSendingEvent from content/common/mac to base/mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add CrAppControlProtocol support to CrDrtApplication Created 9 years, 1 month 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: base/test/mock_chrome_application_mac.h
diff --git a/base/test/mock_chrome_application_mac.h b/base/test/mock_chrome_application_mac.h
index e7e2c678fa4f0aad6583e55d362e92047bbe428e..325c6375ff50c8fd8208107041fd840bfb3128ec 100644
--- a/base/test/mock_chrome_application_mac.h
+++ b/base/test/mock_chrome_application_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -10,12 +10,18 @@
#import <AppKit/AppKit.h>
+#include "base/mac/scoped_sending_event.h"
#include "base/message_pump_mac.h"
-// A mock implementation of CrAppProtocol that claims that -sendEvent: is never
-// on the stack. This can be used in tests that need an NSApplication and use a
-// runloop, but don't run nested message loops.
-@interface MockCrApp : NSApplication<CrAppProtocol>
+// A basic implementation of CrAppProtocol and
+// CrAppControlProtocol. This can be used in tests that need an
+// NSApplication and use a runloop, or which need a ScopedSendingEvent
+// when handling a nested event loop.
+@interface MockCrApp : NSApplication<CrAppProtocol,
+ CrAppControlProtocol> {
+ @private
+ BOOL handlingSendEvent_;
+}
@end
#endif

Powered by Google App Engine
This is Rietveld 408576698