2013-05-02 12:09:19 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2013-05-02 15:03:14 +00:00
|
|
|
#import "browser/atom_application_mac.h"
|
2013-05-02 12:09:19 +00:00
|
|
|
|
|
|
|
#include "base/auto_reset.h"
|
2013-05-02 15:43:23 +00:00
|
|
|
#include "browser/browser.h"
|
2013-05-02 12:09:19 +00:00
|
|
|
|
|
|
|
@implementation AtomApplication
|
|
|
|
|
2013-05-30 08:03:10 +00:00
|
|
|
+ (AtomApplication*)sharedApplication {
|
|
|
|
return (AtomApplication*)[super sharedApplication];
|
|
|
|
}
|
|
|
|
|
2013-05-02 12:09:19 +00:00
|
|
|
- (BOOL)isHandlingSendEvent {
|
|
|
|
return handlingSendEvent_;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)sendEvent:(NSEvent*)event {
|
|
|
|
base::AutoReset<BOOL> scoper(&handlingSendEvent_, YES);
|
|
|
|
[super sendEvent:event];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
|
|
|
|
handlingSendEvent_ = handlingSendEvent;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)closeAllWindows:(id)sender {
|
2013-05-02 15:43:23 +00:00
|
|
|
atom::Browser::Get()->Quit();
|
2013-05-02 12:09:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|