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);
params.guest_delegate = guest_delegate_.get();
web_contents = content::WebContents::Create(params);
} else if(IsOffScreen()) {
} else if (IsOffScreen()) {
content::WebContents::CreateParams params(session->browser_context());
auto view = new OffScreenWebContentsView();
@ -1322,8 +1322,6 @@ void WebContents::OnCursorChange(const content::WebCursor& cursor) {
if (cursor.IsCustom()) {
Emit("cursor-changed", CursorTypeToString(info),
gfx::Image::CreateFrom1xBitmap(info.custom_image),
gfx::Rect(info.custom_image.width(), info.custom_image.height()),
info.hotspot,
info.image_scale_factor);
} else {
Emit("cursor-changed", CursorTypeToString(info));
@ -1395,8 +1393,8 @@ void WebContents::OnPaint(
int bitmap_width,
int bitmap_height,
void* bitmap_pixels) {
v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(isolate
, (char *)bitmap_pixels, sizeof(bitmap_pixels));
v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(isolate,
reinterpret_cast<char *>(bitmap_pixels), sizeof(bitmap_pixels));
const gfx::Size bitmap_size = gfx::Size(bitmap_width, bitmap_height);
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.
REMOTE, // Thin wrap around an existing WebContents.
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)
@ -163,7 +163,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void StartPainting();
void StopPainting();
bool IsPainting() const;
void SetFrameRate(int);
void SetFrameRate(int frame_rate);
int GetFrameRate() const;
// 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.
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences);
// Copy the backgroundColor to webContents.
v8::Local<v8::Value> value;
if (options.Get(options::kBackgroundColor, &value))

View file

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

View file

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