summaryrefslogtreecommitdiffstats
path: root/components/autofill/content/renderer/test_password_generation_agent.h
blob: 1901dbc2ac8ffd862ce0c50c8527636f375b264d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_GENERATION_AGENT_H_
#define COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_GENERATION_AGENT_H_

#include <vector>

#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "components/autofill/content/renderer/password_generation_agent.h"
#include "ipc/ipc_message.h"

namespace autofill {

class TestPasswordGenerationAgent : public PasswordGenerationAgent {
 public:
  TestPasswordGenerationAgent(content::RenderFrame* render_frame,
                              PasswordAutofillAgent* password_agent);
  ~TestPasswordGenerationAgent() override;

  // content::RenderFrameObserver implementation:
  bool OnMessageReceived(const IPC::Message& message) override;

  // PasswordGenreationAgent implementation:
  // Always return true to allow loading of data URLs.
  bool ShouldAnalyzeDocument() const override;

 private:
  DISALLOW_COPY_AND_ASSIGN(TestPasswordGenerationAgent);
};

}  // namespace autofill

#endif  // COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_AUTOFILL_AGENT_H_