Rename methods in autofill

This commit is contained in:
Aleksei Kuzmin 2017-06-22 01:47:01 +03:00
parent 45db999593
commit b8b7d0ab1a
2 changed files with 6 additions and 26 deletions

View file

@ -52,7 +52,6 @@ void TrimStringVectorForIPC(std::vector<base::string16>* strings) {
AutofillAgent::AutofillAgent(
content::RenderFrame* frame)
: content::RenderFrameObserver(frame),
helper_(new Helper(this)),
focused_node_was_last_clicked_(false),
was_focused_before_now_(false),
weak_ptr_factory_(this) {
@ -163,17 +162,12 @@ void AutofillAgent::ShowSuggestions(
ShowPopup(element, data_list_values, data_list_labels);
}
AutofillAgent::Helper::Helper(AutofillAgent* agent)
: content::RenderViewObserver(agent->render_frame()->GetRenderView()),
agent_(agent) {
void AutofillAgent::DidReceiveLeftMouseDownOrGestureTapInNode(const blink::WebNode& node) {
focused_node_was_last_clicked_ = !node.IsNull() && node.Focused();
}
void AutofillAgent::Helper::OnMouseDown(const blink::WebNode& node) {
agent_->focused_node_was_last_clicked_ = !node.IsNull() && node.Focused();
}
void AutofillAgent::Helper::FocusChangeComplete() {
agent_->DoFocusChangeComplete();
void AutofillAgent::DidCompleteFocusChangeInFrame() {
DoFocusChangeComplete();
}
bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {

View file

@ -27,22 +27,10 @@ class AutofillAgent : public content::RenderFrameObserver,
void DidChangeScrollOffset() override;
void FocusedNodeChanged(const blink::WebNode&) override;
void DidCompleteFocusChangeInFrame() override;
void DidReceiveLeftMouseDownOrGestureTapInNode(const blink::WebNode&) override;
private:
class Helper : public content::RenderViewObserver {
public:
explicit Helper(AutofillAgent* agent);
// content::RenderViewObserver implementation.
void OnDestruct() override {}
void OnMouseDown(const blink::WebNode&) override;
void FocusChangeComplete() override;
private:
AutofillAgent* agent_;
};
friend class Helper;
struct ShowSuggestionsOptions {
ShowSuggestionsOptions();
bool autofill_on_empty_values;
@ -71,8 +59,6 @@ class AutofillAgent : public content::RenderFrameObserver,
void DoFocusChangeComplete();
std::unique_ptr<Helper> helper_;
// True when the last click was on the focused node.
bool focused_node_was_last_clicked_;