Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / autofill / test_generated_credit_card_bubble_controller.h
blobeef69f442bd5ef2949bbc3f691a4ab013d4bbf36
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TEST_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_TEST_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h"
12 namespace autofill {
14 class TestGeneratedCreditCardBubbleView;
16 class TestGeneratedCreditCardBubbleController
17 : public GeneratedCreditCardBubbleController {
18 public:
19 explicit TestGeneratedCreditCardBubbleController(
20 content::WebContents* contents);
21 virtual ~TestGeneratedCreditCardBubbleController();
23 // Whether this controller is installed on |web_contents()|.
24 bool IsInstalled() const;
26 // Get an invisible, dumb, test-only bubble.
27 TestGeneratedCreditCardBubbleView* GetTestingBubble();
29 // Made public for testing.
30 using GeneratedCreditCardBubbleController::fronting_card_name;
31 using GeneratedCreditCardBubbleController::backing_card_name;
33 int bubbles_shown() const { return bubbles_shown_; }
35 protected:
36 // GeneratedCreditCardBubbleController:
37 virtual base::WeakPtr<GeneratedCreditCardBubbleView> CreateBubble() OVERRIDE;
38 virtual bool CanShow() const OVERRIDE;
39 virtual void SetupAndShow(const base::string16& fronting_card_name,
40 const base::string16& backing_card_name) OVERRIDE;
42 private:
43 // How many bubbles have been shown via this controller.
44 int bubbles_shown_;
46 DISALLOW_COPY_AND_ASSIGN(TestGeneratedCreditCardBubbleController);
49 } // namespace autofill
51 #endif // CHROME_BROWSER_UI_AUTOFILL_TEST_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_