| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AUTOFILL_AUTOFILL_FEEDBACK_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_FEEDBACK_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FEEDBACK_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FEEDBACK_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "chrome/browser/api/infobars/link_infobar_delegate.h" | 12 #include "chrome/browser/api/infobars/link_infobar_delegate.h" |
| 13 #include "webkit/glue/window_open_disposition.h" | 13 #include "webkit/glue/window_open_disposition.h" |
| 14 | 14 |
| 15 // An InfoBar delegate that prompts the user to provide additional feedback for | 15 // An InfoBar delegate that prompts the user to provide additional feedback for |
| 16 // the Autofill developers. | 16 // the Autofill developers. |
| 17 class AutofillFeedbackInfoBarDelegate : public LinkInfoBarDelegate { | 17 class AutofillFeedbackInfoBarDelegate : public LinkInfoBarDelegate { |
| 18 public: | 18 public: |
| 19 AutofillFeedbackInfoBarDelegate(InfoBarTabService* infobar_service, | 19 AutofillFeedbackInfoBarDelegate(InfoBarService* infobar_service, |
| 20 const string16& message, | 20 const string16& message, |
| 21 const string16& link_text, | 21 const string16& link_text, |
| 22 const std::string& feedback_message); | 22 const std::string& feedback_message); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 virtual ~AutofillFeedbackInfoBarDelegate(); | 25 virtual ~AutofillFeedbackInfoBarDelegate(); |
| 26 | 26 |
| 27 // LinkInfoBarDelegate: | 27 // LinkInfoBarDelegate: |
| 28 virtual string16 GetMessageTextWithOffset(size_t* link_offset) const OVERRIDE; | 28 virtual string16 GetMessageTextWithOffset(size_t* link_offset) const OVERRIDE; |
| 29 virtual string16 GetLinkText() const OVERRIDE; | 29 virtual string16 GetLinkText() const OVERRIDE; |
| 30 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 30 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 31 | 31 |
| 32 // The non-linked infobar text. | 32 // The non-linked infobar text. |
| 33 const string16 message_; | 33 const string16 message_; |
| 34 // The infobar link text. | 34 // The infobar link text. |
| 35 const string16 link_text_; | 35 const string16 link_text_; |
| 36 // The default feedback message, which can be edited by the user prior to | 36 // The default feedback message, which can be edited by the user prior to |
| 37 // submission. | 37 // submission. |
| 38 const std::string feedback_message_; | 38 const std::string feedback_message_; |
| 39 | 39 |
| 40 bool link_clicked_; | 40 bool link_clicked_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(AutofillFeedbackInfoBarDelegate); | 42 DISALLOW_COPY_AND_ASSIGN(AutofillFeedbackInfoBarDelegate); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FEEDBACK_INFOBAR_DELEGATE_H_ | 45 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FEEDBACK_INFOBAR_DELEGATE_H_ |
| OLD | NEW |