does linting

This commit is contained in:
gellert 2016-07-31 12:19:56 +02:00
parent 0a349ef16c
commit 5525ac36b8
11 changed files with 126 additions and 128 deletions

View file

@ -313,7 +313,7 @@ WebContents::WebContents(v8::Isolate* isolate,
guest_delegate_.reset(new WebViewGuestDelegate); guest_delegate_.reset(new WebViewGuestDelegate);
params.guest_delegate = guest_delegate_.get(); params.guest_delegate = guest_delegate_.get();
web_contents = content::WebContents::Create(params); web_contents = content::WebContents::Create(params);
} else if(IsOffScreen()) { } else if (IsOffScreen()) {
content::WebContents::CreateParams params(session->browser_context()); content::WebContents::CreateParams params(session->browser_context());
auto view = new OffScreenWebContentsView(); auto view = new OffScreenWebContentsView();
@ -1322,8 +1322,6 @@ void WebContents::OnCursorChange(const content::WebCursor& cursor) {
if (cursor.IsCustom()) { if (cursor.IsCustom()) {
Emit("cursor-changed", CursorTypeToString(info), Emit("cursor-changed", CursorTypeToString(info),
gfx::Image::CreateFrom1xBitmap(info.custom_image), gfx::Image::CreateFrom1xBitmap(info.custom_image),
gfx::Rect(info.custom_image.width(), info.custom_image.height()),
info.hotspot,
info.image_scale_factor); info.image_scale_factor);
} else { } else {
Emit("cursor-changed", CursorTypeToString(info)); Emit("cursor-changed", CursorTypeToString(info));
@ -1395,8 +1393,8 @@ void WebContents::OnPaint(
int bitmap_width, int bitmap_width,
int bitmap_height, int bitmap_height,
void* bitmap_pixels) { void* bitmap_pixels) {
v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(isolate v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(isolate,
, (char *)bitmap_pixels, sizeof(bitmap_pixels)); reinterpret_cast<char *>(bitmap_pixels), sizeof(bitmap_pixels));
const gfx::Size bitmap_size = gfx::Size(bitmap_width, bitmap_height); const gfx::Size bitmap_size = gfx::Size(bitmap_width, bitmap_height);
Emit("paint", damage_rect, buffer.ToLocalChecked(), bitmap_size); Emit("paint", damage_rect, buffer.ToLocalChecked(), bitmap_size);

View file

@ -50,7 +50,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
BROWSER_WINDOW, // Used by BrowserWindow. BROWSER_WINDOW, // Used by BrowserWindow.
REMOTE, // Thin wrap around an existing WebContents. REMOTE, // Thin wrap around an existing WebContents.
WEB_VIEW, // Used by <webview>. WEB_VIEW, // Used by <webview>.
OFF_SCREEN, // Used for offscreen rendering OFF_SCREEN, // Used for offscreen rendering
}; };
// For node.js callback function type: function(error, buffer) // For node.js callback function type: function(error, buffer)
@ -163,7 +163,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void StartPainting(); void StartPainting();
void StopPainting(); void StopPainting();
bool IsPainting() const; bool IsPainting() const;
void SetFrameRate(int); void SetFrameRate(int frame_rate);
int GetFrameRate() const; int GetFrameRate() const;
// Callback triggered on permission response. // Callback triggered on permission response.

View file

@ -73,7 +73,7 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) {
// Use options.webPreferences to create WebContents. // Use options.webPreferences to create WebContents.
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate); mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences); options.Get(options::kWebPreferences, &web_preferences);
// Copy the backgroundColor to webContents. // Copy the backgroundColor to webContents.
v8::Local<v8::Value> value; v8::Local<v8::Value> value;
if (options.Get(options::kBackgroundColor, &value)) if (options.Get(options::kBackgroundColor, &value))

View file

@ -9,7 +9,6 @@
#include "atom/common/node_includes.h" #include "atom/common/node_includes.h"
#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host.h"
#include <iostream>
#include "content/browser/compositor/image_transport_factory.h" #include "content/browser/compositor/image_transport_factory.h"
#include "cc/surfaces/surface_manager.h" #include "cc/surfaces/surface_manager.h"
#include "cc/surfaces/surface.h" #include "cc/surfaces/surface.h"
@ -19,14 +18,6 @@ namespace atom {
namespace api { namespace api {
FrameSubscriberRenderWidgetHostView::FrameSubscriberRenderWidgetHostView() {
std::cout << "FrameSubscriberRenderWidgetHostView" << std::endl;
}
FrameSubscriberRenderWidgetHostView::~FrameSubscriberRenderWidgetHostView() {
std::cout << "~FrameSubscriberRenderWidgetHostView" << std::endl;
}
FrameSubscriber::FrameSubscriber(v8::Isolate* isolate, FrameSubscriber::FrameSubscriber(v8::Isolate* isolate,
content::RenderWidgetHostView* view, content::RenderWidgetHostView* view,
const FrameCaptureCallback& callback, const FrameCaptureCallback& callback,

View file

@ -22,16 +22,6 @@ namespace atom {
namespace api { namespace api {
class FrameSubscriberRenderWidgetHostView
: public content::RenderWidgetHostViewBase {
public:
FrameSubscriberRenderWidgetHostView();
~FrameSubscriberRenderWidgetHostView();
cc::SurfaceId SurfaceId();
};
class FrameSubscriber : public content::RenderWidgetHostViewFrameSubscriber { class FrameSubscriber : public content::RenderWidgetHostViewFrameSubscriber {
public: public:
using FrameCaptureCallback = using FrameCaptureCallback =

View file

@ -87,7 +87,7 @@ AtomBrowserContext::AtomBrowserContext(
// Read options. // Read options.
use_cache_ = true; use_cache_ = true;
options.GetBoolean("cache", &use_cache_); options.GetBoolean("cache", &use_cache_);
InitPrefs(); InitPrefs();
} }

View file

@ -12,11 +12,10 @@
namespace atom { namespace atom {
typedef base::Callback<void(const gfx::Rect&,int,int,void*)> OnPaintCallback; typedef base::Callback<void(const gfx::Rect&, int, int, void*)> OnPaintCallback;
class OffScreenOutputDevice : public cc::SoftwareOutputDevice { class OffScreenOutputDevice : public cc::SoftwareOutputDevice {
public: public:
OffScreenOutputDevice(bool transparent, const OnPaintCallback& callback); OffScreenOutputDevice(bool transparent, const OnPaintCallback& callback);
~OffScreenOutputDevice(); ~OffScreenOutputDevice();
@ -30,7 +29,7 @@ public:
void OnPaint(const gfx::Rect& damage_rect); void OnPaint(const gfx::Rect& damage_rect);
private: private:
const bool transparent_; const bool transparent_;
const OnPaintCallback callback_; const OnPaintCallback callback_;

View file

@ -4,6 +4,8 @@
#include "atom/browser/osr_render_widget_host_view.h" #include "atom/browser/osr_render_widget_host_view.h"
#include <vector>
#include "third_party/WebKit/public/platform/WebScreenInfo.h" #include "third_party/WebKit/public/platform/WebScreenInfo.h"
#include "components/display_compositor/gl_helper.h" #include "components/display_compositor/gl_helper.h"
#include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h"
@ -303,7 +305,8 @@ class AtomBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
: callback_(callback) { : callback_(callback) {
time_source_ = cc::DelayBasedTimeSource::Create( time_source_ = cc::DelayBasedTimeSource::Create(
base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms), base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms),
content::BrowserThread::GetMessageLoopProxyForThread(content::BrowserThread::UI).get()); content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::UI).get());
time_source_->SetClient(this); time_source_->SetClient(this);
} }
@ -333,7 +336,8 @@ class AtomBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
}; };
OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView( OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
content::RenderWidgetHost* host, NativeWindow* native_window): render_widget_host_(content::RenderWidgetHostImpl::From(host)), content::RenderWidgetHost* host, NativeWindow* native_window):
render_widget_host_(content::RenderWidgetHostImpl::From(host)),
native_window_(native_window), native_window_(native_window),
software_output_device_(NULL), software_output_device_(NULL),
callback_(nullptr), callback_(nullptr),
@ -610,7 +614,8 @@ void OffScreenRenderWidgetHostView::TextInputStateChanged(
void OffScreenRenderWidgetHostView::ImeCancelComposition() { void OffScreenRenderWidgetHostView::ImeCancelComposition() {
} }
void OffScreenRenderWidgetHostView::RenderProcessGone(base::TerminationStatus,int) { void OffScreenRenderWidgetHostView::RenderProcessGone(base::TerminationStatus,
int) {
Destroy(); Destroy();
} }
@ -625,18 +630,19 @@ void OffScreenRenderWidgetHostView::SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params &) { const ViewHostMsg_SelectionBounds_Params &) {
} }
void OffScreenRenderWidgetHostView::CopyFromCompositingSurface(const gfx::Rect& src_subrect, void OffScreenRenderWidgetHostView::CopyFromCompositingSurface(
const gfx::Size& dst_size, const gfx::Rect& src_subrect,
const content::ReadbackRequestCallback& callback, const gfx::Size& dst_size,
const SkColorType preferred_color_type) { const content::ReadbackRequestCallback& callback,
const SkColorType preferred_color_type) {
delegated_frame_host_->CopyFromCompositingSurface( delegated_frame_host_->CopyFromCompositingSurface(
src_subrect, dst_size, callback, preferred_color_type); src_subrect, dst_size, callback, preferred_color_type);
} }
void OffScreenRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame( void OffScreenRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame(
const gfx::Rect& src_subrect, const gfx::Rect& src_subrect,
const scoped_refptr<media::VideoFrame>& target, const scoped_refptr<media::VideoFrame>& target,
const base::Callback<void (const gfx::Rect&, bool)>& callback) { const base::Callback<void(const gfx::Rect&, bool)>& callback) {
delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame(
src_subrect, target, callback); src_subrect, target, callback);
} }
@ -658,7 +664,8 @@ bool OffScreenRenderWidgetHostView::HasAcceleratedSurface(const gfx::Size &) {
return false; return false;
} }
void OffScreenRenderWidgetHostView::GetScreenInfo(blink::WebScreenInfo* results) { void OffScreenRenderWidgetHostView::GetScreenInfo(
blink::WebScreenInfo* results) {
results->rect = gfx::Rect(size_); results->rect = gfx::Rect(size_);
results->availableRect = gfx::Rect(size_); results->availableRect = gfx::Rect(size_);
results->depth = 24; results->depth = 24;
@ -668,7 +675,8 @@ void OffScreenRenderWidgetHostView::GetScreenInfo(blink::WebScreenInfo* results)
results->orientationType = blink::WebScreenOrientationLandscapePrimary; results->orientationType = blink::WebScreenOrientationLandscapePrimary;
} }
bool OffScreenRenderWidgetHostView::GetScreenColorProfile(blink::WebVector<char>*) { bool OffScreenRenderWidgetHostView::GetScreenColorProfile(
blink::WebVector<char>*) {
return false; return false;
} }
@ -694,7 +702,9 @@ gfx::Size OffScreenRenderWidgetHostView::GetRequestedRendererSize() const {
return size_; return size_;
} }
int OffScreenRenderWidgetHostView::DelegatedFrameHostGetGpuMemoryBufferClientId() const { int OffScreenRenderWidgetHostView::
DelegatedFrameHostGetGpuMemoryBufferClientId()
const {
return render_widget_host_->GetProcess()->GetID(); return render_widget_host_->GetProcess()->GetID();
} }
@ -721,7 +731,8 @@ bool OffScreenRenderWidgetHostView::DelegatedFrameCanCreateResizeLock() const {
} }
std::unique_ptr<content::ResizeLock> std::unique_ptr<content::ResizeLock>
OffScreenRenderWidgetHostView::DelegatedFrameHostCreateResizeLock(bool) { OffScreenRenderWidgetHostView::DelegatedFrameHostCreateResizeLock(
bool defer_compositor_lock) {
return nullptr; return nullptr;
} }
@ -736,14 +747,16 @@ void OffScreenRenderWidgetHostView::DelegatedFrameHostSendCompositorSwapAck(
output_surface_id, ack)); output_surface_id, ack));
} }
void OffScreenRenderWidgetHostView::DelegatedFrameHostSendReclaimCompositorResources( void OffScreenRenderWidgetHostView::
DelegatedFrameHostSendReclaimCompositorResources(
int output_surface_id, const cc::CompositorFrameAck& ack) { int output_surface_id, const cc::CompositorFrameAck& ack) {
render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources(
render_widget_host_->GetRoutingID(), render_widget_host_->GetRoutingID(),
output_surface_id, ack)); output_surface_id, ack));
} }
void OffScreenRenderWidgetHostView::DelegatedFrameHostOnLostCompositorResources() { void OffScreenRenderWidgetHostView::
DelegatedFrameHostOnLostCompositorResources() {
render_widget_host_->ScheduleComposite(); render_widget_host_->ScheduleComposite();
} }
@ -753,7 +766,8 @@ void OffScreenRenderWidgetHostView::DelegatedFrameHostUpdateVSyncParameters(
} }
std::unique_ptr<cc::SoftwareOutputDevice> std::unique_ptr<cc::SoftwareOutputDevice>
OffScreenRenderWidgetHostView::CreateSoftwareOutputDevice(ui::Compositor* compositor) { OffScreenRenderWidgetHostView::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
DCHECK_EQ(compositor_.get(), compositor); DCHECK_EQ(compositor_.get(), compositor);
DCHECK(!copy_frame_generator_); DCHECK(!copy_frame_generator_);
DCHECK(!software_output_device_); DCHECK(!software_output_device_);

View file

@ -5,6 +5,9 @@
#ifndef ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_ #ifndef ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_
#define ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_ #define ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_
#include <string>
#include <vector>
#include "atom/browser/native_window.h" #include "atom/browser/native_window.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/browser/renderer_host/render_widget_host_view_base.h"
@ -59,82 +62,85 @@ class OffScreenRenderWidgetHostView:
#endif #endif
public ui::CompositorDelegate, public ui::CompositorDelegate,
public content::DelegatedFrameHostClient { public content::DelegatedFrameHostClient {
public: public:
OffScreenRenderWidgetHostView(content::RenderWidgetHost*, NativeWindow*); OffScreenRenderWidgetHostView(content::RenderWidgetHost*, NativeWindow*);
~OffScreenRenderWidgetHostView(); ~OffScreenRenderWidgetHostView();
// content::RenderWidgetHostView // content::RenderWidgetHostView
bool OnMessageReceived(const IPC::Message&) override; bool OnMessageReceived(const IPC::Message&) override;
void InitAsChild(gfx::NativeView) override; void InitAsChild(gfx::NativeView) override;
content::RenderWidgetHost* GetRenderWidgetHost(void) const override; content::RenderWidgetHost* GetRenderWidgetHost(void) const override;
void SetSize(const gfx::Size &) override; void SetSize(const gfx::Size &) override;
void SetBounds(const gfx::Rect &) override; void SetBounds(const gfx::Rect &) override;
gfx::Vector2dF GetLastScrollOffset(void) const override; gfx::Vector2dF GetLastScrollOffset(void) const override;
gfx::NativeView GetNativeView(void) const override; gfx::NativeView GetNativeView(void) const override;
gfx::NativeViewAccessible GetNativeViewAccessible(void) override; gfx::NativeViewAccessible GetNativeViewAccessible(void) override;
ui::TextInputClient* GetTextInputClient() override; ui::TextInputClient* GetTextInputClient() override;
void Focus(void) override; void Focus(void) override;
bool HasFocus(void) const override; bool HasFocus(void) const override;
bool IsSurfaceAvailableForCopy(void) const override; bool IsSurfaceAvailableForCopy(void) const override;
void Show(void) override; void Show(void) override;
void Hide(void) override; void Hide(void) override;
bool IsShowing(void) override; bool IsShowing(void) override;
gfx::Rect GetViewBounds(void) const override; gfx::Rect GetViewBounds(void) const override;
gfx::Size GetVisibleViewportSize() const override; gfx::Size GetVisibleViewportSize() const override;
void SetInsets(const gfx::Insets&) override; void SetInsets(const gfx::Insets&) override;
bool LockMouse(void) override; bool LockMouse(void) override;
void UnlockMouse(void) override; void UnlockMouse(void) override;
bool GetScreenColorProfile(std::vector<char>*) override; bool GetScreenColorProfile(std::vector<char>*) override;
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override;
void SetActive(bool active) override; void SetActive(bool active) override;
void ShowDefinitionForSelection() override; void ShowDefinitionForSelection() override;
bool SupportsSpeech() const override; bool SupportsSpeech() const override;
void SpeakSelection() override; void SpeakSelection() override;
bool IsSpeaking() const override; bool IsSpeaking() const override;
void StopSpeaking() override; void StopSpeaking() override;
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
// content::RenderWidgetHostViewBase // content::RenderWidgetHostViewBase
void OnSwapCompositorFrame(uint32_t, std::unique_ptr<cc::CompositorFrame>) override; void OnSwapCompositorFrame(uint32_t, std::unique_ptr<cc::CompositorFrame>)
void ClearCompositorFrame(void) override; override;
void InitAsPopup(content::RenderWidgetHostView *, const gfx::Rect &) override; void ClearCompositorFrame(void) override;
void InitAsFullscreen(content::RenderWidgetHostView *) override; void InitAsPopup(content::RenderWidgetHostView *rwhv, const gfx::Rect& rect)
void UpdateCursor(const content::WebCursor &) override; override;
void SetIsLoading(bool) override; void InitAsFullscreen(content::RenderWidgetHostView *) override;
void TextInputStateChanged(const content::TextInputState& params) override; void UpdateCursor(const content::WebCursor &) override;
void ImeCancelComposition(void) override; void SetIsLoading(bool is_loading) override;
void RenderProcessGone(base::TerminationStatus,int) override; void TextInputStateChanged(const content::TextInputState& params) override;
void Destroy(void) override; void ImeCancelComposition(void) override;
void SetTooltipText(const base::string16 &) override; void RenderProcessGone(base::TerminationStatus, int) override;
void Destroy(void) override;
#if defined(OS_MACOSX) void SetTooltipText(const base::string16 &) override;
void SelectionChanged(const base::string16& text,
size_t offset, #if defined(OS_MACOSX)
const gfx::Range& range) override; void SelectionChanged(const base::string16& text,
#endif size_t offset,
const gfx::Range& range) override;
void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &) override; #endif
void CopyFromCompositingSurface(const gfx::Rect &,
const gfx::Size &, void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &)
const content::ReadbackRequestCallback &, override;
const SkColorType) override; void CopyFromCompositingSurface(const gfx::Rect &,
void CopyFromCompositingSurfaceToVideoFrame( const gfx::Size &,
const gfx::Rect &, const content::ReadbackRequestCallback &,
const scoped_refptr<media::VideoFrame> &, const SkColorType) override;
const base::Callback<void (const gfx::Rect &, bool), void CopyFromCompositingSurfaceToVideoFrame(
base::internal::CopyMode::Copyable> &) override; const gfx::Rect &,
bool CanCopyToVideoFrame(void) const override; const scoped_refptr<media::VideoFrame> &,
void BeginFrameSubscription( const base::Callback<void(const gfx::Rect &, bool),
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber>) override; base::internal::CopyMode::Copyable> &) override;
void EndFrameSubscription() override; bool CanCopyToVideoFrame(void) const override;
bool HasAcceleratedSurface(const gfx::Size &) override; void BeginFrameSubscription(
void GetScreenInfo(blink::WebScreenInfo *) override; std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber>) override;
bool GetScreenColorProfile(blink::WebVector<char>*); void EndFrameSubscription() override;
gfx::Rect GetBoundsInRootWindow(void) override; bool HasAcceleratedSurface(const gfx::Size &) override;
void LockCompositingSurface(void) override; void GetScreenInfo(blink::WebScreenInfo *) override;
void UnlockCompositingSurface(void) override; bool GetScreenColorProfile(blink::WebVector<char>*);
gfx::Rect GetBoundsInRootWindow(void) override;
void LockCompositingSurface(void) override;
void UnlockCompositingSurface(void) override;
void ImeCompositionRangeChanged( void ImeCompositionRangeChanged(
const gfx::Range &, const std::vector<gfx::Rect>&) override; const gfx::Range &, const std::vector<gfx::Rect>&) override;
gfx::Size GetPhysicalBackingSize() const override; gfx::Size GetPhysicalBackingSize() const override;
@ -147,7 +153,8 @@ public:
SkColor DelegatedFrameHostGetGutterColor(SkColor) const override; SkColor DelegatedFrameHostGetGutterColor(SkColor) const override;
gfx::Size DelegatedFrameHostDesiredSizeInDIP(void) const override; gfx::Size DelegatedFrameHostDesiredSizeInDIP(void) const override;
bool DelegatedFrameCanCreateResizeLock(void) const override; bool DelegatedFrameCanCreateResizeLock(void) const override;
std::unique_ptr<content::ResizeLock> DelegatedFrameHostCreateResizeLock(bool) override; std::unique_ptr<content::ResizeLock> DelegatedFrameHostCreateResizeLock(
bool defer_compositor_lock) override;
void DelegatedFrameHostResizeLockWasReleased(void) override; void DelegatedFrameHostResizeLockWasReleased(void) override;
void DelegatedFrameHostSendCompositorSwapAck( void DelegatedFrameHostSendCompositorSwapAck(
int, const cc::CompositorFrameAck &) override; int, const cc::CompositorFrameAck &) override;
@ -190,13 +197,13 @@ public:
int bitmap_height, int bitmap_height,
void* bitmap_pixels); void* bitmap_pixels);
void SetPainting(bool); void SetPainting(bool painting);
bool IsPainting() const; bool IsPainting() const;
void SetFrameRate(int); void SetFrameRate(int frame_rate);
int GetFrameRate() const; int GetFrameRate() const;
private: private:
void SetupFrameRate(bool); void SetupFrameRate(bool force);
void ResizeRootLayer(); void ResizeRootLayer();
content::RenderWidgetHostImpl* render_widget_host_; content::RenderWidgetHostImpl* render_widget_host_;

View file

@ -9,7 +9,7 @@
namespace atom { namespace atom {
class DummyWindowWin : public gfx::WindowImpl { class DummyWindowWin : public gfx::WindowImpl {
public: public:
DummyWindowWin() { DummyWindowWin() {
// Create a hidden 1x1 borderless window. // Create a hidden 1x1 borderless window.
set_window_style(WS_POPUP | WS_SYSMENU); set_window_style(WS_POPUP | WS_SYSMENU);
@ -20,7 +20,7 @@ public:
DestroyWindow(hwnd()); DestroyWindow(hwnd());
} }
private: private:
CR_BEGIN_MSG_MAP_EX(DummyWindowWin) CR_BEGIN_MSG_MAP_EX(DummyWindowWin)
CR_MSG_WM_PAINT(OnPaint) CR_MSG_WM_PAINT(OnPaint)
CR_END_MSG_MAP() CR_END_MSG_MAP()

View file

@ -13,8 +13,7 @@ namespace atom {
class OffScreenWebContentsView : public content::WebContentsView, class OffScreenWebContentsView : public content::WebContentsView,
public content::RenderViewHostDelegateView { public content::RenderViewHostDelegateView {
public: public:
OffScreenWebContentsView(); OffScreenWebContentsView();
~OffScreenWebContentsView(); ~OffScreenWebContentsView();
@ -60,7 +59,7 @@ public:
const content::DragEventSourceInfo& event_info) override; const content::DragEventSourceInfo& event_info) override;
void UpdateDragCursor(blink::WebDragOperation operation) override; void UpdateDragCursor(blink::WebDragOperation operation) override;
private: private:
content::RenderWidgetHostViewBase* view_; content::RenderWidgetHostViewBase* view_;
content::WebContents* web_contents_; content::WebContents* web_contents_;
}; };