| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 11 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 11 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
| 12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
| 13 | 13 |
| 14 class MockTabModalConfirmDialogDelegate : public TabModalConfirmDialogDelegate { | 14 class MockTabModalConfirmDialogDelegate : public TabModalConfirmDialogDelegate { |
| 15 public: | 15 public: |
| 16 class Delegate { | 16 class Delegate { |
| 17 public: | 17 public: |
| 18 virtual void OnAccepted() = 0; | 18 virtual void OnAccepted() = 0; |
| 19 virtual void OnCanceled() = 0; | 19 virtual void OnCanceled() = 0; |
| 20 protected: | 20 protected: |
| 21 virtual ~Delegate() {} | 21 virtual ~Delegate() {} |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 MockTabModalConfirmDialogDelegate(content::WebContents* web_contents, | 24 MockTabModalConfirmDialogDelegate(Delegate* delegate); |
| 25 Delegate* delegate); | |
| 26 virtual ~MockTabModalConfirmDialogDelegate(); | 25 virtual ~MockTabModalConfirmDialogDelegate(); |
| 27 | 26 |
| 28 virtual string16 GetTitle() OVERRIDE; | 27 virtual string16 GetTitle() OVERRIDE; |
| 29 virtual string16 GetMessage() OVERRIDE; | 28 virtual string16 GetMessage() OVERRIDE; |
| 30 | 29 |
| 31 virtual void OnAccepted() OVERRIDE; | 30 virtual void OnAccepted() OVERRIDE; |
| 32 virtual void OnCanceled() OVERRIDE; | 31 virtual void OnCanceled() OVERRIDE; |
| 33 | 32 |
| 34 private: | 33 private: |
| 35 Delegate* delegate_; | 34 Delegate* delegate_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 58 TabModalConfirmDialog* dialog_; | 57 TabModalConfirmDialog* dialog_; |
| 59 | 58 |
| 60 int accepted_count_; | 59 int accepted_count_; |
| 61 int canceled_count_; | 60 int canceled_count_; |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogTest); | 63 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogTest); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 #endif // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ | 66 #endif // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ |
| OLD | NEW |