mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Branch CEF3 files from /branches/cef3 to /trunk/cef3 (issue #564).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@571 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
46
libcef/browser/application_mac.mm
Normal file
46
libcef/browser/application_mac.mm
Normal file
@@ -0,0 +1,46 @@
|
||||
// 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/message_pump_mac.h"
|
||||
#include "base/mac/scoped_sending_event.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];
|
||||
}
|
Reference in New Issue
Block a user