OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_APPLICATION_MAC_H_ | 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ |
6 #define CHROME_BROWSER_CHROME_BROWSER_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 <AppKit/AppKit.h> |
(...skipping 12 matching lines...) Expand all Loading... |
23 // Our implementation of |-terminate:| only attempts to terminate the | 23 // Our implementation of |-terminate:| only attempts to terminate the |
24 // application, i.e., begins a process which may lead to termination. This | 24 // application, i.e., begins a process which may lead to termination. This |
25 // method cancels that process. | 25 // method cancels that process. |
26 - (void)cancelTerminate:(id)sender; | 26 - (void)cancelTerminate:(id)sender; |
27 | 27 |
28 // Keep track of whether windows are being cycled for use in determining whether | 28 // Keep track of whether windows are being cycled for use in determining whether |
29 // a Panel window can become the key window. | 29 // a Panel window can become the key window. |
30 - (BOOL)isCyclingWindows; | 30 - (BOOL)isCyclingWindows; |
31 @end | 31 @end |
32 | 32 |
33 namespace chrome_browser_application_mac { | |
34 | |
35 // Bin for unknown exceptions. Exposed for testing purposes. | |
36 extern const size_t kUnknownNSException; | |
37 | |
38 // Returns the histogram bin for |exception| if it is one we track | |
39 // specifically, or |kUnknownNSException| if unknown. Exposed for testing | |
40 // purposes. | |
41 size_t BinForException(NSException* exception); | |
42 | |
43 // Use UMA to track exception occurance. Exposed for testing purposes. | |
44 void RecordExceptionWithUma(NSException* exception); | |
45 | |
46 } // namespace chrome_browser_application_mac | |
47 | |
48 #endif // __OBJC__ | 33 #endif // __OBJC__ |
49 | 34 |
50 namespace chrome_browser_application_mac { | 35 namespace chrome_browser_application_mac { |
51 | 36 |
52 // To be used to instantiate BrowserCrApplication from C++ code. | 37 // To be used to instantiate BrowserCrApplication from C++ code. |
53 void RegisterBrowserCrApp(); | 38 void RegisterBrowserCrApp(); |
54 | 39 |
55 // Calls -[NSApp terminate:]. | 40 // Calls -[NSApp terminate:]. |
56 void Terminate(); | 41 void Terminate(); |
57 | 42 |
58 // Cancels a termination started by |Terminate()|. | 43 // Cancels a termination started by |Terminate()|. |
59 void CancelTerminate(); | 44 void CancelTerminate(); |
60 | 45 |
61 } // namespace chrome_browser_application_mac | 46 } // namespace chrome_browser_application_mac |
62 | 47 |
63 #endif // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ | 48 #endif // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ |
OLD | NEW |