🎨 lint fix

This commit is contained in:
Heilig Benedek 2017-05-19 21:52:18 +02:00
parent f360104bee
commit 4949531f57
8 changed files with 88 additions and 76 deletions

View file

@ -2,14 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include <algorithm>
#include <utility>
#include <vector>
#include "atom/browser/ui/autofill_popup.h" #include "atom/browser/ui/autofill_popup.h"
#include "atom/common/api/api_messages.h" #include "atom/common/api/api_messages.h"
#include "ui/display/display.h" #include "ui/display/display.h"
#include "ui/display/screen.h" #include "ui/display/screen.h"
#include "ui/gfx/text_utils.h"
#include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h" #include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/text_utils.h"
namespace atom { namespace atom {
@ -116,7 +120,8 @@ void AutofillPopup::CreateView(
gfx::Rect lb(std::floor(r.x()), std::floor(r.y() + r.height()), gfx::Rect lb(std::floor(r.x()), std::floor(r.y() + r.height()),
std::floor(r.width()), std::floor(r.height())); std::floor(r.width()), std::floor(r.height()));
gfx::Point menu_position(lb.origin()); gfx::Point menu_position(lb.origin());
views::View::ConvertPointToScreen(parent_widget->GetContentsView(), &menu_position); views::View::ConvertPointToScreen(
parent_widget->GetContentsView(), &menu_position);
popup_bounds_ = gfx::Rect(menu_position, lb.size()); popup_bounds_ = gfx::Rect(menu_position, lb.size());
element_bounds_ = popup_bounds_; element_bounds_ = popup_bounds_;

View file

@ -5,6 +5,8 @@
#ifndef ATOM_BROWSER_UI_AUTOFILL_POPUP_H_ #ifndef ATOM_BROWSER_UI_AUTOFILL_POPUP_H_
#define ATOM_BROWSER_UI_AUTOFILL_POPUP_H_ #define ATOM_BROWSER_UI_AUTOFILL_POPUP_H_
#include <vector>
#include "atom/browser/ui/views/autofill_popup_view.h" #include "atom/browser/ui/views/autofill_popup_view.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "ui/gfx/font_list.h" #include "ui/gfx/font_list.h"
@ -17,7 +19,7 @@ class AutofillPopupView;
class AutofillPopup { class AutofillPopup {
public: public:
AutofillPopup(gfx::NativeView); explicit AutofillPopup(gfx::NativeView);
~AutofillPopup(); ~AutofillPopup();
void CreateView(int routing_id, content::WebContents* web_contents, void CreateView(int routing_id, content::WebContents* web_contents,
@ -26,6 +28,7 @@ class AutofillPopup {
void SetItems(const std::vector<base::string16>& values, void SetItems(const std::vector<base::string16>& values,
const std::vector<base::string16>& labels); const std::vector<base::string16>& labels);
private: private:
friend class AutofillPopupView; friend class AutofillPopupView;

View file

@ -4,6 +4,8 @@
#include "atom/renderer/atom_autofill_agent.h" #include "atom/renderer/atom_autofill_agent.h"
#include <vector>
#include "atom/common/api/api_messages.h" #include "atom/common/api/api_messages.h"
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view.h"
@ -45,7 +47,7 @@ void TrimStringVectorForIPC(std::vector<base::string16>* strings) {
(*strings)[i].resize(kMaxDataLength); (*strings)[i].resize(kMaxDataLength);
} }
} }
} // namespace } // namespace
AutofillAgent::AutofillAgent( AutofillAgent::AutofillAgent(
content::RenderFrame* frame) content::RenderFrame* frame)

View file

@ -5,6 +5,8 @@
#ifndef ATOM_RENDERER_ATOM_AUTOFILL_AGENT_H_ #ifndef ATOM_RENDERER_ATOM_AUTOFILL_AGENT_H_
#define ATOM_RENDERER_ATOM_AUTOFILL_AGENT_H_ #define ATOM_RENDERER_ATOM_AUTOFILL_AGENT_H_
#include <vector>
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_frame_observer.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h" #include "third_party/WebKit/public/web/WebAutofillClient.h"
@ -17,7 +19,7 @@ namespace atom {
class AutofillAgent : public content::RenderFrameObserver, class AutofillAgent : public content::RenderFrameObserver,
public blink::WebAutofillClient { public blink::WebAutofillClient {
public: public:
AutofillAgent(content::RenderFrame* frame); explicit AutofillAgent(content::RenderFrame* frame);
// content::RenderFrameObserver: // content::RenderFrameObserver:
void OnDestruct() override; void OnDestruct() override;
@ -33,7 +35,7 @@ class AutofillAgent : public content::RenderFrameObserver,
}; };
bool OnMessageReceived(const IPC::Message& message) override; bool OnMessageReceived(const IPC::Message& message) override;
void OnWebContentsRoutingIdReceived(int); void OnWebContentsRoutingIdReceived(int routing_id);
// blink::WebAutofillClient: // blink::WebAutofillClient:
void textFieldDidEndEditing(const blink::WebInputElement&) override; void textFieldDidEndEditing(const blink::WebInputElement&) override;