From 97e8800677f6d18827dfcb560a5ef118b9e87a13 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 10 Apr 2018 15:23:16 +0900 Subject: [PATCH] Remove web_contents from NativeWindow's constructor --- atom/browser/native_window.cc | 7 ++----- atom/browser/native_window.h | 7 +++---- atom/browser/native_window_mac.mm | 2 +- atom/browser/native_window_views.cc | 2 +- atom/browser/ui/message_box_gtk.cc | 1 + atom/browser/ui/message_box_mac.mm | 1 + atom/browser/ui/message_box_win.cc | 1 + 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 1acf6dee4bd2..643d084672c6 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -12,17 +12,14 @@ #include "atom/browser/window_list.h" #include "atom/common/color_util.h" #include "atom/common/options_switches.h" -#include "brightray/browser/inspectable_web_contents.h" #include "native_mate/dictionary.h" DEFINE_WEB_CONTENTS_USER_DATA_KEY(atom::NativeWindowRelay); namespace atom { -NativeWindow::NativeWindow( - brightray::InspectableWebContents* inspectable_web_contents, - const mate::Dictionary& options, - NativeWindow* parent) +NativeWindow::NativeWindow(const mate::Dictionary& options, + NativeWindow* parent) : has_frame_(true), transparent_(false), enable_larger_than_screen_(false), diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index 86f6f2166b07..aed859e22f8c 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -11,13 +11,11 @@ #include #include "atom/browser/native_window_observer.h" -#include "atom/browser/ui/atom_menu_model.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/supports_user_data.h" #include "content/public/browser/web_contents_user_data.h" #include "extensions/browser/app_window/size_constraints.h" -#include "native_mate/persistent_dictionary.h" class SkRegion; @@ -39,10 +37,12 @@ class Size; namespace mate { class Dictionary; +class PersistentDictionary; } namespace atom { +class AtomMenuModel; class NativeBrowserView; struct DraggableRegion; @@ -272,8 +272,7 @@ class NativeWindow : public base::SupportsUserData { bool is_modal() const { return is_modal_; } protected: - NativeWindow(brightray::InspectableWebContents* inspectable_web_contents, - const mate::Dictionary& options, + NativeWindow(const mate::Dictionary& options, NativeWindow* parent); void set_browser_view(NativeBrowserView* browser_view) { diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 844bde3e0954..d46b060201a0 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -780,7 +780,7 @@ NativeWindowMac::NativeWindowMac( brightray::InspectableWebContents* web_contents, const mate::Dictionary& options, NativeWindow* parent) - : NativeWindow(web_contents, options, parent), + : NativeWindow(options, parent), is_kiosk_(false), was_fullscreen_(false), zoom_to_page_width_(false), diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index b1f7c3ee1063..2a94ca20cf3b 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -122,7 +122,7 @@ NativeWindowViews::NativeWindowViews( brightray::InspectableWebContents* web_contents, const mate::Dictionary& options, NativeWindow* parent) - : NativeWindow(web_contents, options, parent), + : NativeWindow(options, parent), window_(new views::Widget), web_view_(web_contents->GetView()->GetView()), focused_view_(web_contents->GetView()->GetWebView()), diff --git a/atom/browser/ui/message_box_gtk.cc b/atom/browser/ui/message_box_gtk.cc index 76fd5eb89b47..5b94ee8ee652 100644 --- a/atom/browser/ui/message_box_gtk.cc +++ b/atom/browser/ui/message_box_gtk.cc @@ -16,6 +16,7 @@ #include "chrome/browser/ui/libgtkui/gtk_signal.h" #include "chrome/browser/ui/libgtkui/gtk_util.h" #include "chrome/browser/ui/libgtkui/skia_utils_gtk.h" +#include "ui/gfx/image/image_skia.h" #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" #define ANSI_FOREGROUND_RED "\x1b[31m" diff --git a/atom/browser/ui/message_box_mac.mm b/atom/browser/ui/message_box_mac.mm index 5c3802464c6b..9a3b6c7ae0df 100644 --- a/atom/browser/ui/message_box_mac.mm +++ b/atom/browser/ui/message_box_mac.mm @@ -11,6 +11,7 @@ #include "base/mac/mac_util.h" #include "base/strings/sys_string_conversions.h" #include "skia/ext/skia_utils_mac.h" +#include "ui/gfx/image/image_skia.h" @interface ModalDelegate : NSObject { @private diff --git a/atom/browser/ui/message_box_win.cc b/atom/browser/ui/message_box_win.cc index 844a057ae6fd..6983138a0087 100644 --- a/atom/browser/ui/message_box_win.cc +++ b/atom/browser/ui/message_box_win.cc @@ -21,6 +21,7 @@ #include "base/win/scoped_gdi_object.h" #include "content/public/browser/browser_thread.h" #include "ui/gfx/icon_util.h" +#include "ui/gfx/image/image_skia.h" namespace atom {