cef/libcef/browser/application_mac.mm
Marshall Greenblatt 2fc9788311 Update to Chromium revision 207871.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1281 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-06-22 02:06:32 +00:00

47 lines
1.1 KiB
Plaintext

// Copyright (c) 2012 The Chromium Embedded Framework Authors.
// Portions copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/browser/application_mac.h"
#include "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_pump_mac.h"
@interface CefCrApplication : NSApplication<CrAppProtocol,
CrAppControlProtocol> {
@private
BOOL handlingSendEvent_;
}
// CrAppProtocol:
- (BOOL)isHandlingSendEvent;
// CrAppControlProtocol:
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
@end
@implementation CefCrApplication
- (BOOL)isHandlingSendEvent {
return handlingSendEvent_;
}
- (void)sendEvent:(NSEvent*)event {
BOOL wasHandlingSendEvent = handlingSendEvent_;
handlingSendEvent_ = YES;
[super sendEvent:event];
handlingSendEvent_ = wasHandlingSendEvent;
}
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
handlingSendEvent_ = handlingSendEvent;
}
@end
void CefCrApplicationCreate() {
[CefCrApplication sharedApplication];
}