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_BROWSER_CHROME_APPLICATION_MAC_H_ | 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ |
6 #define CHROME_BROWSER_CHROME_APPLICATION_MAC_H_ | 6 #define CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ |
7 | 7 |
8 #ifdef __OBJC__ | 8 #ifdef __OBJC__ |
9 | 9 |
10 #import <AppKit/AppKit.h> | 10 #import "base/chrome_application_mac.h" |
11 | 11 |
12 @interface CrApplication : NSApplication | 12 @interface BrowserCrApplication : CrApplication |
13 @end | 13 @end |
14 | 14 |
15 // Namespace for exception-reporting helper functions. Exposed for | 15 namespace chrome_browser_application_mac { |
16 // testing purposes. | |
17 namespace CrApplicationNSException { | |
18 | 16 |
19 // Bin for unknown exceptions. | 17 // Bin for unknown exceptions. Exposed for testing purposes. |
20 extern const size_t kUnknownNSException; | 18 extern const size_t kUnknownNSException; |
21 | 19 |
22 // Returns the histogram bin for |exception| if it is one we track | 20 // Returns the histogram bin for |exception| if it is one we track |
23 // specifically, or |kUnknownNSException| if unknown. | 21 // specifically, or |kUnknownNSException| if unknown. Exposed for testing |
| 22 // purposes. |
24 size_t BinForException(NSException* exception); | 23 size_t BinForException(NSException* exception); |
25 | 24 |
26 // Use UMA to track exception occurance. | 25 // Use UMA to track exception occurance. Exposed for testing purposes. |
27 void RecordExceptionWithUma(NSException* exception); | 26 void RecordExceptionWithUma(NSException* exception); |
28 | 27 |
29 } // CrApplicationNSException | 28 } // namespace chrome_browser_application_mac |
30 | 29 |
31 #endif // __OBJC__ | 30 #endif // __OBJC__ |
32 | 31 |
33 // CrApplicationCC provides access to CrApplication Objective-C selectors from | 32 namespace chrome_browser_application_mac { |
34 // C++ code. | |
35 namespace CrApplicationCC { | |
36 | 33 |
37 // Calls -[NSApp terminate:]. | 34 // Calls -[NSApp terminate:]. |
38 void Terminate(); | 35 void Terminate(); |
39 | 36 |
40 } // namespace CrApplicationCC | 37 } // namespace chrome_browser_application_mac |
41 | 38 |
42 #endif // CHROME_BROWSER_CHROME_APPLICATION_MAC_H_ | 39 #endif // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ |
OLD | NEW |