• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
7 #pragma once
8 
9 #ifdef __OBJC__
10 
11 #import "content/common/chrome_application_mac.h"
12 
13 @interface BrowserCrApplication : CrApplication
14 // Our implementation of |-terminate:| only attempts to terminate the
15 // application, i.e., begins a process which may lead to termination. This
16 // method cancels that process.
17 - (void)cancelTerminate:(id)sender;
18 @end
19 
20 namespace chrome_browser_application_mac {
21 
22 // Bin for unknown exceptions. Exposed for testing purposes.
23 extern const size_t kUnknownNSException;
24 
25 // Returns the histogram bin for |exception| if it is one we track
26 // specifically, or |kUnknownNSException| if unknown.  Exposed for testing
27 // purposes.
28 size_t BinForException(NSException* exception);
29 
30 // Use UMA to track exception occurance. Exposed for testing purposes.
31 void RecordExceptionWithUma(NSException* exception);
32 
33 }  // namespace chrome_browser_application_mac
34 
35 #endif  // __OBJC__
36 
37 namespace chrome_browser_application_mac {
38 
39 // To be used to instantiate BrowserCrApplication from C++ code.
40 void RegisterBrowserCrApp();
41 
42 // Calls -[NSApp terminate:].
43 void Terminate();
44 
45 // Cancels a termination started by |Terminate()|.
46 void CancelTerminate();
47 
48 }  // namespace chrome_browser_application_mac
49 
50 #endif  // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
51