Move OnBrowserReady call to PreMainMessageLoopRun to account for timing issues on macOS

This commit is contained in:
Samuel Attard 2017-09-14 23:08:18 +10:00 committed by Cheng Zhao
parent 28900a9b63
commit f928a399ae
3 changed files with 14 additions and 0 deletions

View file

@ -74,6 +74,8 @@ class App : public AtomBrowserClient::Delegate,
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
static App* Get();
// Called when window with disposition needs to be created.
void OnCreateWindow(
const GURL& target_url,
@ -94,10 +96,12 @@ class App : public AtomBrowserClient::Delegate,
base::FilePath GetAppPath() const;
void RenderProcessReady(content::RenderProcessHost* host);
void RenderProcessDisconnected(base::ProcessId host_pid);
void PreMainMessageLoopRun();
protected:
explicit App(v8::Isolate* isolate);
~App() override;
static App* self_ = nullptr;
// BrowserObserver:
void OnBeforeQuit(bool* prevent_default) override;