NativeWindow is no longer WebContentsObserver

This commit is contained in:
Cheng Zhao 2018-03-06 15:24:54 +09:00
Родитель bf862d1d07
Коммит 9c7854aef6
3 изменённых файлов: 5 добавлений и 34 удалений

Просмотреть файл

@ -33,6 +33,7 @@
#include "chrome/browser/speech/tts_message_filter.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"

Просмотреть файл

@ -8,35 +8,12 @@
#include <utility>
#include <vector>
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/browser.h"
#include "atom/browser/window_list.h"
#include "atom/common/color_util.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/options_switches.h"
#include "base/files/file_util.h"
#include "base/json/json_writer.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/content_switches.h"
#include "ipc/ipc_message_macros.h"
#include "native_mate/dictionary.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/size_conversions.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(atom::NativeWindowRelay);
@ -46,8 +23,7 @@ NativeWindow::NativeWindow(
brightray::InspectableWebContents* inspectable_web_contents,
const mate::Dictionary& options,
NativeWindow* parent)
: content::WebContentsObserver(inspectable_web_contents->GetWebContents()),
has_frame_(true),
: has_frame_(true),
transparent_(false),
enable_larger_than_screen_(false),
is_closed_(false),

Просмотреть файл

@ -11,20 +11,13 @@
#include <vector>
#include "atom/browser/native_window_observer.h"
#include "atom/browser/ui/accelerator_util.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/readback_types.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "native_mate/persistent_dictionary.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
class SkRegion;
@ -37,8 +30,10 @@ struct NativeWebKeyboardEvent;
}
namespace gfx {
class Image;
class Point;
class Rect;
class RectF;
class Size;
}
@ -52,8 +47,7 @@ class NativeBrowserView;
struct DraggableRegion;
class NativeWindow : public base::SupportsUserData,
public content::WebContentsObserver {
class NativeWindow : public base::SupportsUserData {
public:
~NativeWindow() override;