]> khamidou — GitHub mirrors - electron.git/commitdiff
Add has_frame_ attribute for NativeWindow.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 5 Sep 2013 13:43:47 +0000 (21:43 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 5 Sep 2013 13:43:47 +0000 (21:43 +0800)
browser/native_window.cc
browser/native_window.h

index 34bdefd6acce45a2d8abb96f433f83fba320e909..154a1a60738229e3659a9e72960dbbfcb8ac945a 100644 (file)
@@ -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);
index cde0ce1f494ee0e7cce06b40d49f02d3ac04d3d0..8fb0f118fddf1e93463fc97d068d29662ea6eee3 100644 (file)
@@ -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();