Fix cpplint warnings
authorCheng Zhao <zcbenz@gmail.com>
Fri, 18 Sep 2015 06:12:48 +0000 (14:12 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 18 Sep 2015 06:12:48 +0000 (14:12 +0800)
atom/browser/api/atom_api_window.cc
atom/browser/native_window.cc
atom/browser/native_window.h

index a285141..db7b1d5 100644 (file)
@@ -8,7 +8,6 @@
 #include "atom/browser/api/atom_api_web_contents.h"
 #include "atom/browser/browser.h"
 #include "atom/browser/native_window.h"
-#include "atom/common/node_includes.h"
 #include "atom/common/native_mate_converters/blink_converter.h"
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/gfx_converter.h"
index 55fe206..8095452 100644 (file)
@@ -107,9 +107,8 @@ NativeWindow* NativeWindow::FromWebContents(
     content::WebContents* web_contents) {
   WindowList& window_list = *WindowList::GetInstance();
   for (NativeWindow* window : window_list) {
-    if (window->web_contents() == web_contents){
+    if (window->web_contents() == web_contents)
       return window;
-    }
   }
   return nullptr;
 }
@@ -290,16 +289,12 @@ void NativeWindow::SetAspectRatio(double aspect_ratio,
 
 void NativeWindow::SetFrameSubscription(bool isOffscreen) {
   const auto view = web_contents()->GetRenderWidgetHostView();
-
   if (view) {
     if (isOffscreen) {
       scoped_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber(
         new RenderSubscriber(
           view->GetVisibleViewportSize(),
-          base::Bind(&NativeWindow::OnFrameReceived, base::Unretained(this))
-        )
-      );
-
+          base::Bind(&NativeWindow::OnFrameReceived, base::Unretained(this))));
       view->BeginFrameSubscription(subscriber.Pass());
     } else {
       view->EndFrameSubscription();
@@ -593,7 +588,8 @@ bool RenderSubscriber::ShouldCaptureFrame(
                                             gfx::Rect(size_), size_,
                                             base::TimeDelta());
 
-  *callback = base::Bind(&RenderSubscriber::CallbackMethod, callback_, *storage);
+  *callback =
+      base::Bind(&RenderSubscriber::CallbackMethod, callback_, *storage);
   return true;
 }
 
index 1eabd5e..3344cfb 100644 (file)
@@ -313,10 +313,14 @@ class NativeWindow : public content::WebContentsObserver,
   DISALLOW_COPY_AND_ASSIGN(NativeWindow);
 };
 
-//This class provides a way to listen to frame renders and to use the rendered frames for offscreen rendering
+// This class provides a way to listen to frame renders and to use the rendered
+// frames for offscreen rendering
 class RenderSubscriber : public content::RenderWidgetHostViewFrameSubscriber {
  public:
-  RenderSubscriber(gfx::Size size, base::Callback<void(bool, scoped_refptr<media::VideoFrame>)> callback) : size_(size), callback_(callback) {}
+  RenderSubscriber(
+      gfx::Size size,
+      base::Callback<void(bool, scoped_refptr<media::VideoFrame>)> callback)
+      : size_(size), callback_(callback) {}
 
   bool ShouldCaptureFrame(const gfx::Rect& damage_rect,
                           base::TimeTicks present_time,
@@ -325,10 +329,11 @@ class RenderSubscriber : public content::RenderWidgetHostViewFrameSubscriber {
 
   base::TimeTicks last_present_time() const { return last_present_time_; }
 
-  static void CallbackMethod(base::Callback<void(bool, scoped_refptr<media::VideoFrame>)> callback,
-                             scoped_refptr<media::VideoFrame> frame,
-                             base::TimeTicks present_time,
-                             bool success) {
+  static void CallbackMethod(
+      base::Callback<void(bool, scoped_refptr<media::VideoFrame>)> callback,
+      scoped_refptr<media::VideoFrame> frame,
+      base::TimeTicks present_time,
+      bool success) {
     callback.Run(success, frame);
   }