Mac: Add DevTools tests and resources to cefclient.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@290 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
d27343bac5
commit
792e78795f
3
cef.gyp
3
cef.gyp
|
@ -143,11 +143,12 @@
|
||||||
],
|
],
|
||||||
'copies': [
|
'copies': [
|
||||||
{
|
{
|
||||||
# Add library dependencies and app launcher script to the bundle.
|
# Add library dependencies and inspector resources to the bundle.
|
||||||
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/',
|
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/',
|
||||||
'files': [
|
'files': [
|
||||||
'<(PRODUCT_DIR)/libcef.dylib',
|
'<(PRODUCT_DIR)/libcef.dylib',
|
||||||
'<(PRODUCT_DIR)/ffmpegsumo.so',
|
'<(PRODUCT_DIR)/ffmpegsumo.so',
|
||||||
|
'<(PRODUCT_DIR)/resources/',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -204,6 +204,8 @@ NSButton* MakeButton(NSRect* rect, NSString* title, NSView* parent) {
|
||||||
- (IBAction)testZoomIn:(id)sender;
|
- (IBAction)testZoomIn:(id)sender;
|
||||||
- (IBAction)testZoomOut:(id)sender;
|
- (IBAction)testZoomOut:(id)sender;
|
||||||
- (IBAction)testZoomReset:(id)sender;
|
- (IBAction)testZoomReset:(id)sender;
|
||||||
|
- (IBAction)testDevToolsShow:(id)sender;
|
||||||
|
- (IBAction)testDevToolsClose:(id)sender;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ClientAppDelegate
|
@implementation ClientAppDelegate
|
||||||
|
@ -282,6 +284,12 @@ NSButton* MakeButton(NSRect* rect, NSString* title, NSView* parent) {
|
||||||
[testMenu addItemWithTitle:@"Zoom Reset"
|
[testMenu addItemWithTitle:@"Zoom Reset"
|
||||||
action:@selector(testZoomReset:)
|
action:@selector(testZoomReset:)
|
||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
|
[testMenu addItemWithTitle:@"Show DevTools"
|
||||||
|
action:@selector(testDevToolsShow:)
|
||||||
|
keyEquivalent:@""];
|
||||||
|
[testMenu addItemWithTitle:@"Close DevTools"
|
||||||
|
action:@selector(testDevToolsClose:)
|
||||||
|
keyEquivalent:@""];
|
||||||
[testItem setSubmenu:testMenu];
|
[testItem setSubmenu:testMenu];
|
||||||
[menubar addItem:testItem];
|
[menubar addItem:testItem];
|
||||||
|
|
||||||
|
@ -475,6 +483,20 @@ NSButton* MakeButton(NSRect* rect, NSString* title, NSView* parent) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (IBAction)testDevToolsShow:(id)sender {
|
||||||
|
if(g_handler.get() && g_handler->GetBrowserHwnd()) {
|
||||||
|
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||||
|
browser->ShowDevTools();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)testDevToolsClose:(id)sender {
|
||||||
|
if(g_handler.get() && g_handler->GetBrowserHwnd()) {
|
||||||
|
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||||
|
browser->CloseDevTools();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Sent by the default notification center immediately before the application
|
// Sent by the default notification center immediately before the application
|
||||||
// terminates.
|
// terminates.
|
||||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||||
|
|
Loading…
Reference in New Issue