mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-25 00:39:11 +01:00
243a9c26d7
- Delete include/cef_runnable.h (issue #1336). - Build the cef_unittests target using all Chromium headers. Add a USING_CHROMIUM_INCLUDES define and libcef_dll_wrapper_unittests target to support this. This change avoids compile errors due to the divergence of CEF and Chromium base/ header implementations. The libcef_dll_wrapper sources must now compile successfully with both CEF and Chromium base/ headers (issue #1632). - The onbeforeunload message specified via JavaScript is no longer passed to the client (see http://crbug.com/587940).
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
// Copyright (c) 2011 The Chromium Embedded Framework 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 "include/cef_app.h"
|
|
#import "include/cef_application_mac.h"
|
|
|
|
// Memory AutoRelease pool.
|
|
static NSAutoreleasePool* g_autopool = nil;
|
|
|
|
// Provide the CefAppProtocol implementation required by CEF.
|
|
@interface TestApplication : NSApplication<CefAppProtocol> {
|
|
@private
|
|
BOOL handlingSendEvent_;
|
|
}
|
|
@end
|
|
|
|
@implementation TestApplication
|
|
- (BOOL)isHandlingSendEvent {
|
|
return handlingSendEvent_;
|
|
}
|
|
|
|
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
|
|
handlingSendEvent_ = handlingSendEvent;
|
|
}
|
|
|
|
- (void)sendEvent:(NSEvent*)event {
|
|
CefScopedSendingEvent sendingEventScoper;
|
|
[super sendEvent:event];
|
|
}
|
|
@end
|
|
|
|
void PlatformInit() {
|
|
// Initialize the AutoRelease pool.
|
|
g_autopool = [[NSAutoreleasePool alloc] init];
|
|
|
|
// Initialize the TestApplication instance.
|
|
[TestApplication sharedApplication];
|
|
}
|
|
|
|
void PlatformCleanup() {
|
|
// Release the AutoRelease pool.
|
|
[g_autopool release];
|
|
}
|
|
|