Dev tools working
@@ -1,5 +1,7 @@
|
||||
#include "include/cef_app.h"
|
||||
|
||||
class ClientHandler;
|
||||
|
||||
@interface Atom : NSApplication <CefAppProtocol, NSApplicationDelegate> {
|
||||
@private
|
||||
NSWindow *_hiddenWindow;
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
CefString(&settings.user_agent) = "";
|
||||
CefString(&settings.log_file) = "";
|
||||
CefString(&settings.javascript_flags) = "";
|
||||
|
||||
|
||||
settings.remote_debugging_port = 9090;
|
||||
settings.log_severity = LOGSEVERITY_ERROR;
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@
|
||||
}
|
||||
|
||||
- (void)open:(NSString *)path {
|
||||
[[AtomController alloc] initWithPath:path atomContext:[self atomContext]];
|
||||
[[AtomController alloc] initWithPath:path atomContext:NULL];
|
||||
}
|
||||
|
||||
- (IBAction)runSpecs:(id)sender {
|
||||
|
||||
@@ -23,7 +23,6 @@ void ClientHandler::OnBeforeContextMenu(
|
||||
CefRefPtr<CefMenuModel> model) {
|
||||
|
||||
model->AddItem(MENU_ID_USER_FIRST, "&Show DevTools");
|
||||
CefString devtools_url = browser->GetHost()->GetDevToolsURL(true);
|
||||
}
|
||||
|
||||
bool ClientHandler::OnContextMenuCommand(
|
||||
@@ -89,7 +88,8 @@ void ClientHandler::OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
}
|
||||
|
||||
void ClientHandler::ShowDevTools(CefRefPtr<CefBrowser> browser) {
|
||||
std::string devtools_url = "chrome-devtools://devtools/devtools.html?docked=true";//browser->GetHost()->GetDevToolsURL(true);
|
||||
std::string devtools_url = browser->GetHost()->GetDevToolsURL(true);
|
||||
std::cout << devtools_url;
|
||||
if (!devtools_url.empty()) {
|
||||
browser->GetMainFrame()->ExecuteJavaScript("window.open('" + devtools_url + "');", "about:blank", 0);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ int main(int argc, char* argv[]) {
|
||||
NSNib *mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:[NSBundle mainBundle]];
|
||||
[mainNib instantiateNibWithOwner:application topLevelObjects:nil]; // Execute the secondary process, if any.
|
||||
|
||||
[application open:""];
|
||||
[application open:@""];
|
||||
|
||||
// Run the application message loop.
|
||||
CefRunMessageLoop();
|
||||
|
||||
|
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 752 B |
|
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |
|
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 174 B |
|
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |