Rename methods in autofill
This commit is contained in:
parent
45db999593
commit
b8b7d0ab1a
2 changed files with 6 additions and 26 deletions
|
@ -52,7 +52,6 @@ void TrimStringVectorForIPC(std::vector<base::string16>* strings) {
|
||||||
AutofillAgent::AutofillAgent(
|
AutofillAgent::AutofillAgent(
|
||||||
content::RenderFrame* frame)
|
content::RenderFrame* frame)
|
||||||
: content::RenderFrameObserver(frame),
|
: content::RenderFrameObserver(frame),
|
||||||
helper_(new Helper(this)),
|
|
||||||
focused_node_was_last_clicked_(false),
|
focused_node_was_last_clicked_(false),
|
||||||
was_focused_before_now_(false),
|
was_focused_before_now_(false),
|
||||||
weak_ptr_factory_(this) {
|
weak_ptr_factory_(this) {
|
||||||
|
@ -163,17 +162,12 @@ void AutofillAgent::ShowSuggestions(
|
||||||
ShowPopup(element, data_list_values, data_list_labels);
|
ShowPopup(element, data_list_values, data_list_labels);
|
||||||
}
|
}
|
||||||
|
|
||||||
AutofillAgent::Helper::Helper(AutofillAgent* agent)
|
void AutofillAgent::DidReceiveLeftMouseDownOrGestureTapInNode(const blink::WebNode& node) {
|
||||||
: content::RenderViewObserver(agent->render_frame()->GetRenderView()),
|
focused_node_was_last_clicked_ = !node.IsNull() && node.Focused();
|
||||||
agent_(agent) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutofillAgent::Helper::OnMouseDown(const blink::WebNode& node) {
|
void AutofillAgent::DidCompleteFocusChangeInFrame() {
|
||||||
agent_->focused_node_was_last_clicked_ = !node.IsNull() && node.Focused();
|
DoFocusChangeComplete();
|
||||||
}
|
|
||||||
|
|
||||||
void AutofillAgent::Helper::FocusChangeComplete() {
|
|
||||||
agent_->DoFocusChangeComplete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
|
bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
|
||||||
|
|
|
@ -27,22 +27,10 @@ class AutofillAgent : public content::RenderFrameObserver,
|
||||||
|
|
||||||
void DidChangeScrollOffset() override;
|
void DidChangeScrollOffset() override;
|
||||||
void FocusedNodeChanged(const blink::WebNode&) override;
|
void FocusedNodeChanged(const blink::WebNode&) override;
|
||||||
|
void DidCompleteFocusChangeInFrame() override;
|
||||||
|
void DidReceiveLeftMouseDownOrGestureTapInNode(const blink::WebNode&) override;
|
||||||
|
|
||||||
private:
|
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 {
|
struct ShowSuggestionsOptions {
|
||||||
ShowSuggestionsOptions();
|
ShowSuggestionsOptions();
|
||||||
bool autofill_on_empty_values;
|
bool autofill_on_empty_values;
|
||||||
|
@ -71,8 +59,6 @@ class AutofillAgent : public content::RenderFrameObserver,
|
||||||
|
|
||||||
void DoFocusChangeComplete();
|
void DoFocusChangeComplete();
|
||||||
|
|
||||||
std::unique_ptr<Helper> helper_;
|
|
||||||
|
|
||||||
// True when the last click was on the focused node.
|
// True when the last click was on the focused node.
|
||||||
bool focused_node_was_last_clicked_;
|
bool focused_node_was_last_clicked_;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue