From: Cheng Zhao Date: Thu, 5 Sep 2013 13:43:47 +0000 (+0800) Subject: Add has_frame_ attribute for NativeWindow. X-Git-Tag: v0.4.5~4^2~9 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a5eb9ea08f6398e4a8f077c9bc91f3e695c80926;p=electron.git Add has_frame_ attribute for NativeWindow. --- diff --git a/browser/native_window.cc b/browser/native_window.cc index 34bdefd6..154a1a60 100644 --- a/browser/native_window.cc +++ b/browser/native_window.cc @@ -39,10 +39,13 @@ namespace atom { NativeWindow::NativeWindow(content::WebContents* web_contents, base::DictionaryValue* options) : content::WebContentsObserver(web_contents), + has_frame_(true), is_closed_(false), not_responding_(false), inspectable_web_contents_( brightray::InspectableWebContents::Create(web_contents)) { + options->GetBoolean(switches::kFrame, &has_frame_); + web_contents->SetDelegate(this); WindowList::AddWindow(this); diff --git a/browser/native_window.h b/browser/native_window.h index cde0ce1f..8fb0f118 100644 --- a/browser/native_window.h +++ b/browser/native_window.h @@ -165,6 +165,9 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate, const content::NotificationSource& source, const content::NotificationDetails& details) OVERRIDE; + // Whether window has standard frame. + bool has_frame_; + private: void RendererUnresponsiveDelayed();