Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_CHROME_APPLICATION_MAC_H_ | 5 #ifndef CHROME_COMMON_CHROME_APPLICATION_MAC_H_ |
| 6 #define CHROME_COMMON_CHROME_APPLICATION_MAC_H_ | 6 #define CHROME_COMMON_CHROME_APPLICATION_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(__OBJC__) | |
| 10 | |
| 9 #import <AppKit/AppKit.h> | 11 #import <AppKit/AppKit.h> |
| 10 | 12 |
| 11 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 12 #include "base/message_pump_mac.h" | 14 #include "base/message_pump_mac.h" |
| 13 #include "base/scoped_nsobject.h" | 15 #include "base/scoped_nsobject.h" |
| 14 | 16 |
| 15 // Event hooks must implement this protocol. | 17 // Event hooks must implement this protocol. |
| 16 @protocol CrApplicationEventHookProtocol | 18 @protocol CrApplicationEventHookProtocol |
| 17 - (void)hookForEvent:(NSEvent*)theEvent; | 19 - (void)hookForEvent:(NSEvent*)theEvent; |
| 18 @end | 20 @end |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 48 public: | 50 public: |
| 49 ScopedSendingEvent(); | 51 ScopedSendingEvent(); |
| 50 ~ScopedSendingEvent(); | 52 ~ScopedSendingEvent(); |
| 51 | 53 |
| 52 private: | 54 private: |
| 53 CrApplication* app_; | 55 CrApplication* app_; |
| 54 BOOL handling_; | 56 BOOL handling_; |
| 55 DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); | 57 DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 } // chrome_application_mac | 60 } // chrome_application_mac |
|
Mark Mentovai
2010/12/23 21:39:22
Nit: this line and line 69 should be “// namespace
| |
| 59 | 61 |
| 62 #endif // defined(__OBJC__) | |
| 63 | |
| 64 namespace chrome_application_mac { | |
| 65 | |
| 66 // To be used to instantiate CrApplication from C++ code. | |
| 67 void RegisterCrApp(); | |
| 68 | |
| 69 } // chrome_application_mac | |
| 70 | |
| 60 #endif // CHROME_COMMON_CHROME_APPLICATION_MAC_H_ | 71 #endif // CHROME_COMMON_CHROME_APPLICATION_MAC_H_ |
| OLD | NEW |