diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index d9ef7a1de1df..d2ff197929a5 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1245,18 +1245,20 @@ void WebContents::HasServiceWorker( struct WrappedCallback { base::Callback callback_; - WrappedCallback(const base::Callback& callback) : callback_(callback) {} + explicit WrappedCallback(const base::Callback& callback) + : callback_(callback) {} void Run(content::ServiceWorkerCapability capability) { - callback_.Run(capability != content::ServiceWorkerCapability::NO_SERVICE_WORKER); + callback_.Run(capability != + content::ServiceWorkerCapability::NO_SERVICE_WORKER); delete this; } }; auto wrapped_callback = new WrappedCallback(callback); - context->CheckHasServiceWorker(web_contents()->GetLastCommittedURL(), - GURL::EmptyGURL(), - base::Bind(&WrappedCallback::Run, base::Unretained(wrapped_callback))); + context->CheckHasServiceWorker( + web_contents()->GetLastCommittedURL(), GURL::EmptyGURL(), + base::Bind(&WrappedCallback::Run, base::Unretained(wrapped_callback))); } void WebContents::UnregisterServiceWorker( diff --git a/atom/browser/api/frame_subscriber.cc b/atom/browser/api/frame_subscriber.cc index ce9f8cb3389c..8f66a91a5184 100644 --- a/atom/browser/api/frame_subscriber.cc +++ b/atom/browser/api/frame_subscriber.cc @@ -23,7 +23,7 @@ void CopyPixelsToBuffer(const SkBitmap& bitmap, memcpy(node::Buffer::Data(buffer), bitmap.getPixels(), rgb_arr_size); } - + } // namespace namespace api { diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 0e9a70b6f0a7..65ad2f57dd4e 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -1271,8 +1271,8 @@ void NativeWindowViews::HandleKeyboardEvent( if (event.GetType() == blink::WebInputEvent::kRawKeyDown && IsAltKey(event)) { // When a single Alt is pressed: menu_bar_alt_pressed_ = true; - } else if (event.GetType() == blink::WebInputEvent::kKeyUp && IsAltKey(event) && - menu_bar_alt_pressed_) { + } else if (event.GetType() == blink::WebInputEvent::kKeyUp && + IsAltKey(event) && menu_bar_alt_pressed_) { // When a single Alt is released right after a Alt is pressed: menu_bar_alt_pressed_ = false; SetMenuBarVisibility(!menu_bar_visible_); diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index 6d6d22b02902..eeea5b20ed17 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -5,6 +5,8 @@ #include "atom/browser/osr/osr_render_widget_host_view.h" #include +#include +#include #include #include "base/callback_helpers.h" @@ -90,10 +92,11 @@ ui::MouseEvent UiMouseEventFromWebMouseEvent(blink::WebMouseEvent event) { } ui::MouseEvent ui_event(type, - gfx::Point(std::floor(event.PositionInWidget().x), std::floor(event.PositionInWidget().y)), - gfx::Point(std::floor(event.PositionInWidget().x), std::floor(event.PositionInWidget().y)), - ui::EventTimeForNow(), - button_flags, button_flags); + gfx::Point(std::floor(event.PositionInWidget().x), + std::floor(event.PositionInWidget().y)), + gfx::Point(std::floor(event.PositionInWidget().x), + std::floor(event.PositionInWidget().y)), + ui::EventTimeForNow(), button_flags, button_flags); ui_event.SetClickCount(event.click_count); return ui_event; @@ -1111,7 +1114,8 @@ void OffScreenRenderWidgetHostView::ProcessMouseEvent( const ui::LatencyInfo& latency) { for (auto proxy_view : proxy_views_) { gfx::Rect bounds = proxy_view->GetBounds(); - if (bounds.Contains(event.PositionInWidget().x, event.PositionInWidget().y)) { + if (bounds.Contains(event.PositionInWidget().x, + event.PositionInWidget().y)) { blink::WebMouseEvent proxy_event(event); proxy_event.SetPositionInWidget( proxy_event.PositionInWidget().x - bounds.x(), @@ -1128,8 +1132,10 @@ void OffScreenRenderWidgetHostView::ProcessMouseEvent( event.PositionInWidget().x, event.PositionInWidget().y)) { blink::WebMouseEvent popup_event(event); popup_event.SetPositionInWidget( - popup_event.PositionInWidget().x - popup_host_view_->popup_position_.x(), - popup_event.PositionInWidget().y - popup_host_view_->popup_position_.y()); + popup_event.PositionInWidget().x - + popup_host_view_->popup_position_.x(), + popup_event.PositionInWidget().y - + popup_host_view_->popup_position_.y()); popup_host_view_->ProcessMouseEvent(popup_event, latency); return; @@ -1146,7 +1152,8 @@ void OffScreenRenderWidgetHostView::ProcessMouseWheelEvent( const ui::LatencyInfo& latency) { for (auto proxy_view : proxy_views_) { gfx::Rect bounds = proxy_view->GetBounds(); - if (bounds.Contains(event.PositionInWidget().x, event.PositionInWidget().y)) { + if (bounds.Contains(event.PositionInWidget().x, + event.PositionInWidget().y)) { blink::WebMouseWheelEvent proxy_event(event); proxy_event.SetPositionInWidget( proxy_event.PositionInWidget().x - bounds.x(), @@ -1164,8 +1171,10 @@ void OffScreenRenderWidgetHostView::ProcessMouseWheelEvent( event.PositionInWidget().x, event.PositionInWidget().y)) { blink::WebMouseWheelEvent popup_event(event); popup_event.SetPositionInWidget( - popup_event.PositionInWidget().x - popup_host_view_->popup_position_.x(), - popup_event.PositionInWidget().y - popup_host_view_->popup_position_.y()); + popup_event.PositionInWidget().x - + popup_host_view_->popup_position_.x(), + popup_event.PositionInWidget().y - + popup_host_view_->popup_position_.y()); popup_host_view_->ProcessMouseWheelEvent(popup_event, latency); return; } else { diff --git a/atom/renderer/atom_autofill_agent.cc b/atom/renderer/atom_autofill_agent.cc index 039ddd9ae56c..bb7ca0e17999 100644 --- a/atom/renderer/atom_autofill_agent.cc +++ b/atom/renderer/atom_autofill_agent.cc @@ -162,7 +162,8 @@ void AutofillAgent::ShowSuggestions( ShowPopup(element, data_list_values, data_list_labels); } -void AutofillAgent::DidReceiveLeftMouseDownOrGestureTapInNode(const blink::WebNode& node) { +void AutofillAgent::DidReceiveLeftMouseDownOrGestureTapInNode( + const blink::WebNode& node) { focused_node_was_last_clicked_ = !node.IsNull() && node.Focused(); } diff --git a/atom/renderer/atom_autofill_agent.h b/atom/renderer/atom_autofill_agent.h index 2862fa9acc3e..5c82e37347d2 100644 --- a/atom/renderer/atom_autofill_agent.h +++ b/atom/renderer/atom_autofill_agent.h @@ -28,7 +28,8 @@ class AutofillAgent : public content::RenderFrameObserver, void DidChangeScrollOffset() override; void FocusedNodeChanged(const blink::WebNode&) override; void DidCompleteFocusChangeInFrame() override; - void DidReceiveLeftMouseDownOrGestureTapInNode(const blink::WebNode&) override; + void DidReceiveLeftMouseDownOrGestureTapInNode( + const blink::WebNode&) override; private: struct ShowSuggestionsOptions {