fix: print warning after DOM is created

This commit is contained in:
Cheng Zhao 2018-10-17 10:42:02 +09:00
parent 714f3ffd29
commit 8716f718a9
3 changed files with 20 additions and 2 deletions

View file

@ -142,6 +142,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void SetIgnoreMenuShortcuts(bool ignore);
void SetAudioMuted(bool muted);
bool IsAudioMuted();
bool IsDOMReady() const;
void Print(mate::Arguments* args);
std::vector<printing::PrinterBasicInfo> GetPrinterList();
void SetEmbedder(const WebContents* embedder);
@ -462,6 +463,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
// Whether to enable devtools.
bool enable_devtools_ = true;
// Whether page's document is ready.
bool is_dom_ready_ = false;
// Observers of this WebContents.
base::ObserverList<ExtendedWebContentsObserver> observers_;