Throw error when BrowserWindow is created before app is ready

This commit is contained in:
Cheng Zhao 2014-10-30 21:32:35 +08:00
parent 35e5c2172f
commit 25f69df341
5 changed files with 20 additions and 5 deletions

View file

@ -84,6 +84,7 @@ class Browser : public WindowListObserver {
}
bool is_quiting() const { return is_quiting_; }
bool is_ready() const { return is_ready_; }
protected:
// Returns the version of application bundle or executable file.
@ -105,6 +106,9 @@ class Browser : public WindowListObserver {
// Observers of the browser.
ObserverList<BrowserObserver> observers_;
// Whether "ready" event has been emitted.
bool is_ready_;
std::string version_override_;
std::string name_override_;