| Index: chrome/browser/chrome_browser_application_mac.mm
|
| ===================================================================
|
| --- chrome/browser/chrome_browser_application_mac.mm (revision 30825)
|
| +++ chrome/browser/chrome_browser_application_mac.mm (working copy)
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#import "chrome/browser/chrome_application_mac.h"
|
| +#import "chrome/browser/chrome_browser_application_mac.h"
|
|
|
| #import "base/histogram.h"
|
| #import "base/logging.h"
|
| @@ -11,7 +11,6 @@
|
| #import "chrome/app/breakpad_mac.h"
|
| #import "chrome/browser/cocoa/chrome_event_processing_window.h"
|
| #import "chrome/browser/cocoa/objc_method_swizzle.h"
|
| -#import "chrome/browser/renderer_host/render_widget_host_view_mac.h"
|
|
|
| // The implementation of NSExceptions break various assumptions in the
|
| // Chrome code. This category defines a replacement for
|
| @@ -49,7 +48,7 @@
|
| }
|
| @end
|
|
|
| -namespace CrApplicationNSException {
|
| +namespace chrome_browser_application_mac {
|
|
|
| // Maximum number of known named exceptions we'll support. There is
|
| // no central registration, but I only find about 75 possibilities in
|
| @@ -99,8 +98,12 @@
|
| histogram.Add(BinForException(exception));
|
| }
|
|
|
| -} // CrApplicationNSException
|
| +void Terminate() {
|
| + [NSApp terminate:nil];
|
| +}
|
|
|
| +} // namespace chrome_browser_application_mac
|
| +
|
| namespace {
|
|
|
| // Helper to make it easy to get crash keys right.
|
| @@ -133,12 +136,9 @@
|
|
|
| } // namespace
|
|
|
| -@implementation CrApplication
|
| +@implementation BrowserCrApplication
|
|
|
| - init {
|
| - // TODO(shess): Push this somewhere where it can apply to the plugin
|
| - // and renderer processes, and where it can intercept uncaught
|
| - // exceptions.
|
| DCHECK(SwizzleNSExceptionInit());
|
| return [super init];
|
| }
|
| @@ -244,6 +244,7 @@
|
| }
|
|
|
| - (void)sendEvent:(NSEvent*)event {
|
| + chrome_application_mac::ScopedSendingEvent scoper(self);
|
| // The superclass's |sendEvent:| sends keyboard events to the menu and the key
|
| // view loop before dispatching them to |keyDown:|. Since we want to send keys
|
| // to the renderer before sending them to the menu, and we never want them to
|
| @@ -269,7 +270,7 @@
|
| DCHECK(!reportingException);
|
| if (!reportingException) {
|
| reportingException = YES;
|
| - CrApplicationNSException::RecordExceptionWithUma(anException);
|
| + chrome_browser_application_mac::RecordExceptionWithUma(anException);
|
|
|
| // Store some human-readable information in breakpad keys in case
|
| // there is a crash. Since breakpad does not provide infinite
|
| @@ -306,11 +307,3 @@
|
| }
|
|
|
| @end
|
| -
|
| -namespace CrApplicationCC {
|
| -
|
| -void Terminate() {
|
| - [NSApp terminate:nil];
|
| -}
|
| -
|
| -} // namespace CrApplicationCC
|
|
|