mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
Handle title change. But there's a bug in CEF that makes this only work once.
This commit is contained in:
parent
44db540528
commit
20dd59194b
@ -66,6 +66,8 @@ class AtomCefClient : public CefClient,
|
||||
const CefString& source,
|
||||
int line) OVERRIDE;
|
||||
|
||||
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) OVERRIDE;
|
||||
|
||||
// CefJsDialogHandlerMethods
|
||||
virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser,
|
||||
|
@ -47,6 +47,13 @@ void AtomCefClient::Confirm(int replyId,
|
||||
browser->SendProcessMessage(PID_RENDERER, replyMessage);
|
||||
}
|
||||
|
||||
|
||||
void AtomCefClient::OnTitleChange(CefRefPtr<CefBrowser> browser, const CefString& title) {
|
||||
NSLog(@"TITLE CHANGE %s", title.ToString().c_str());
|
||||
NSWindow *window = [browser->GetHost()->GetWindowHandle() window];
|
||||
[window setTitle:[NSString stringWithUTF8String:title.ToString().c_str()]];
|
||||
}
|
||||
|
||||
void AtomCefClient::ToggleDevTools(CefRefPtr<CefBrowser> browser) {
|
||||
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
|
||||
[windowController toggleDevTools];
|
||||
|
Loading…
Reference in New Issue
Block a user