Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2010 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 BASE_TEST_MOCK_CHROME_APPLICATION_MAC_H_ | |
| 6 #define BASE_TEST_MOCK_CHROME_APPLICATION_MAC_H_ | |
| 7 #pragma once | |
| 8 | |
|
Mark Mentovai
2010/12/17 17:31:38
Extra blank line.
Nico
2010/12/18 01:14:28
Done.
| |
| 9 | |
| 10 #ifdef __OBJC__ | |
|
Mark Mentovai
2010/12/17 17:31:38
Chromium code prefers #if defined(__OBJC__).
Nico
2010/12/18 01:14:28
Done.
| |
| 11 | |
| 12 #import <Cocoa/Cocoa.h> | |
|
Mark Mentovai
2010/12/17 17:31:38
You can get away with just AppKit/AppKit.h.
Nico
2010/12/18 01:14:28
Done.
| |
| 13 | |
| 14 #include "base/message_pump_mac.h" | |
| 15 | |
| 16 // A mock implementation of CrAppProtocol that claims that -sendEvent: is never | |
| 17 // on the stack. This can be used in tests that need an NSApplication and which | |
|
dmac
2010/12/17 18:00:16
I think you can get rid of both "whichs" in the la
Nico
2010/12/18 01:14:28
Done.
| |
| 18 // use a runloop, but which don't run nested message loops. | |
| 19 @interface MockCrApp : NSApplication<CrAppProtocol> | |
| 20 @end | |
| 21 | |
| 22 #endif | |
| 23 | |
| 24 // To be used to instantiate MockCrApp from C++ code. | |
| 25 namespace mock_cr_app { | |
| 26 void RegisterMockCrApp(); | |
| 27 } | |
|
Mark Mentovai
2010/12/17 17:31:38
} // namespace mock_cr_app
Nico
2010/12/18 01:14:28
Done.
| |
| 28 | |
| 29 #endif // BASE_TEST_MOCK_CHROME_APPLICATION_MAC_H_ | |
| OLD | NEW |