Remove web_contents from NativeWindow's constructor

This commit is contained in:
Cheng Zhao 2018-04-10 15:23:16 +09:00
parent 6fc819dae1
commit 97e8800677
7 changed files with 10 additions and 11 deletions

View file

@ -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),

View file

@ -11,13 +11,11 @@
#include <vector>
#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) {

View file

@ -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),

View file

@ -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()),

View file

@ -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"

View file

@ -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

View file

@ -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 {