does linting
This commit is contained in:
		
					parent
					
						
							
								0a349ef16c
							
						
					
				
			
			
				commit
				
					
						5525ac36b8
					
				
			
		
					 11 changed files with 126 additions and 128 deletions
				
			
		| 
						 | 
					@ -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);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 =
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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_;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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,7 +630,8 @@ void OffScreenRenderWidgetHostView::SelectionBoundsChanged(
 | 
				
			||||||
  const ViewHostMsg_SelectionBounds_Params &) {
 | 
					  const ViewHostMsg_SelectionBounds_Params &) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void OffScreenRenderWidgetHostView::CopyFromCompositingSurface(const gfx::Rect& src_subrect,
 | 
					void OffScreenRenderWidgetHostView::CopyFromCompositingSurface(
 | 
				
			||||||
 | 
					    const gfx::Rect& src_subrect,
 | 
				
			||||||
    const gfx::Size& dst_size,
 | 
					    const gfx::Size& dst_size,
 | 
				
			||||||
    const content::ReadbackRequestCallback& callback,
 | 
					    const content::ReadbackRequestCallback& callback,
 | 
				
			||||||
    const SkColorType preferred_color_type) {
 | 
					    const SkColorType preferred_color_type) {
 | 
				
			||||||
| 
						 | 
					@ -636,7 +642,7 @@ void OffScreenRenderWidgetHostView::CopyFromCompositingSurface(const gfx::Rect&
 | 
				
			||||||
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_);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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,7 +62,7 @@ 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();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,15 +100,17 @@ public:
 | 
				
			||||||
#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>)
 | 
				
			||||||
 | 
					    override;
 | 
				
			||||||
  void ClearCompositorFrame(void) override;
 | 
					  void ClearCompositorFrame(void) override;
 | 
				
			||||||
  void InitAsPopup(content::RenderWidgetHostView *, const gfx::Rect &) override;
 | 
					  void InitAsPopup(content::RenderWidgetHostView *rwhv, const gfx::Rect& rect)
 | 
				
			||||||
 | 
					    override;
 | 
				
			||||||
  void InitAsFullscreen(content::RenderWidgetHostView *) override;
 | 
					  void InitAsFullscreen(content::RenderWidgetHostView *) override;
 | 
				
			||||||
  void UpdateCursor(const content::WebCursor &) override;
 | 
					  void UpdateCursor(const content::WebCursor &) override;
 | 
				
			||||||
  void SetIsLoading(bool) override;
 | 
					  void SetIsLoading(bool is_loading) override;
 | 
				
			||||||
  void TextInputStateChanged(const content::TextInputState& params) override;
 | 
					  void TextInputStateChanged(const content::TextInputState& params) override;
 | 
				
			||||||
  void ImeCancelComposition(void) override;
 | 
					  void ImeCancelComposition(void) override;
 | 
				
			||||||
  void RenderProcessGone(base::TerminationStatus,int) override;
 | 
					  void RenderProcessGone(base::TerminationStatus, int) override;
 | 
				
			||||||
  void Destroy(void) override;
 | 
					  void Destroy(void) override;
 | 
				
			||||||
  void SetTooltipText(const base::string16 &) override;
 | 
					  void SetTooltipText(const base::string16 &) override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,7 +120,8 @@ public:
 | 
				
			||||||
                        const gfx::Range& range) override;
 | 
					                        const gfx::Range& range) override;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &) override;
 | 
					  void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &)
 | 
				
			||||||
 | 
					    override;
 | 
				
			||||||
  void CopyFromCompositingSurface(const gfx::Rect &,
 | 
					  void CopyFromCompositingSurface(const gfx::Rect &,
 | 
				
			||||||
    const gfx::Size &,
 | 
					    const gfx::Size &,
 | 
				
			||||||
    const content::ReadbackRequestCallback &,
 | 
					    const content::ReadbackRequestCallback &,
 | 
				
			||||||
| 
						 | 
					@ -123,7 +129,7 @@ public:
 | 
				
			||||||
  void CopyFromCompositingSurfaceToVideoFrame(
 | 
					  void CopyFromCompositingSurfaceToVideoFrame(
 | 
				
			||||||
    const gfx::Rect &,
 | 
					    const gfx::Rect &,
 | 
				
			||||||
    const scoped_refptr<media::VideoFrame> &,
 | 
					    const scoped_refptr<media::VideoFrame> &,
 | 
				
			||||||
    const base::Callback<void (const gfx::Rect &, bool),
 | 
					    const base::Callback<void(const gfx::Rect &, bool),
 | 
				
			||||||
    base::internal::CopyMode::Copyable> &) override;
 | 
					    base::internal::CopyMode::Copyable> &) override;
 | 
				
			||||||
  bool CanCopyToVideoFrame(void) const override;
 | 
					  bool CanCopyToVideoFrame(void) const override;
 | 
				
			||||||
  void BeginFrameSubscription(
 | 
					  void BeginFrameSubscription(
 | 
				
			||||||
| 
						 | 
					@ -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_;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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_;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue