From: Cheng Zhao Date: Thu, 25 Jun 2015 05:08:11 +0000 (+0800) Subject: Allowing destroying a closed window X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb370ba22ac01957624ed4433686cf54fc53a963;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Allowing destroying a closed window --- diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 3e2bbd1..01ed474 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -498,6 +498,9 @@ void NativeWindow::RenderViewCreated( } void NativeWindow::CloseContents(content::WebContents* source) { + if (!inspectable_web_contents_) + return; + inspectable_web_contents_->GetView()->SetDelegate(nullptr); inspectable_web_contents_ = nullptr; diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 4c7700d..e0e276f 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -16,7 +16,8 @@ #include "atom/common/draggable_region.h" #include "atom/common/options_switches.h" #include "base/strings/utf_string_conversions.h" -#include "browser/inspectable_web_contents_view.h" +#include "brightray/browser/inspectable_web_contents.h" +#include "brightray/browser/inspectable_web_contents_view.h" #include "content/public/browser/native_web_keyboard_event.h" #include "native_mate/dictionary.h" #include "ui/aura/window.h"