OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_ |
6 #define CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/ui/confirm_bubble_model.h" | 9 #include "chrome/browser/ui/confirm_bubble_model.h" |
10 | 10 |
11 // A test version of the model for confirmation bubbles. | 11 // A test version of the model for confirmation bubbles. |
12 class TestConfirmBubbleModel : public ConfirmBubbleModel { | 12 class TestConfirmBubbleModel : public ConfirmBubbleModel { |
13 public: | 13 public: |
14 // Parameters may be NULL depending on the needs of the test. | 14 // Parameters may be NULL depending on the needs of the test. |
15 TestConfirmBubbleModel(bool* model_deleted, | 15 TestConfirmBubbleModel(bool* model_deleted, |
16 bool* accept_clicked, | 16 bool* accept_clicked, |
17 bool* cancel_clicked, | 17 bool* cancel_clicked, |
18 bool* link_clicked); | 18 bool* link_clicked); |
19 ~TestConfirmBubbleModel() override; | 19 ~TestConfirmBubbleModel() override; |
20 | 20 |
21 // ConfirmBubbleModel overrides: | 21 // ConfirmBubbleModel overrides: |
22 base::string16 GetTitle() const override; | 22 base::string16 GetTitle() const override; |
23 base::string16 GetMessageText() const override; | 23 base::string16 GetMessageText() const override; |
24 gfx::Image* GetIcon() const override; | |
25 int GetButtons() const override; | 24 int GetButtons() const override; |
26 base::string16 GetButtonLabel(BubbleButton button) const override; | 25 base::string16 GetButtonLabel(BubbleButton button) const override; |
27 void Accept() override; | 26 void Accept() override; |
28 void Cancel() override; | 27 void Cancel() override; |
29 base::string16 GetLinkText() const override; | 28 base::string16 GetLinkText() const override; |
30 void LinkClicked() override; | 29 void LinkClicked() override; |
31 | 30 |
32 private: | 31 private: |
33 bool* model_deleted_; | 32 bool* model_deleted_; |
34 bool* accept_clicked_; | 33 bool* accept_clicked_; |
35 bool* cancel_clicked_; | 34 bool* cancel_clicked_; |
36 bool* link_clicked_; | 35 bool* link_clicked_; |
37 | 36 |
38 DISALLOW_COPY_AND_ASSIGN(TestConfirmBubbleModel); | 37 DISALLOW_COPY_AND_ASSIGN(TestConfirmBubbleModel); |
39 }; | 38 }; |
40 | 39 |
41 #endif // CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_ | 40 #endif // CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_ |
OLD | NEW |