Index: chrome/browser/ui/sad_tab.h |
diff --git a/chrome/browser/ui/sad_tab.h b/chrome/browser/ui/sad_tab.h |
index e22b14948072cf051583412bce85faf415b8bf81..fee977fca727b1b8f78257c7f73d21cb50d72b13 100644 |
--- a/chrome/browser/ui/sad_tab.h |
+++ b/chrome/browser/ui/sad_tab.h |
@@ -17,6 +17,11 @@ namespace chrome { |
// Cross-platform interface to show the Sad tab UI. |
class SadTab { |
public: |
+ enum class Action { |
+ BUTTON, |
+ HELP_LINK, |
+ }; |
+ |
// Factory function to create the platform specific implementations. |
static SadTab* Create(content::WebContents* web_contents, SadTabKind kind); |
@@ -25,11 +30,29 @@ class SadTab { |
virtual ~SadTab() {} |
- // Shows the Sad tab. |
- virtual void Show() = 0; |
+ int GetTitle(); |
+ int GetMessage(); |
+ int GetButtonTitle(); |
+ int GetHelpLinkTitle(); |
+ const char* GetHelpLinkURL(); |
+ |
+ // Virtual for testing. |
+ virtual void RecordFirstPaint(); |
+ virtual void PerformAction(Action); |
+ |
+ protected: |
+ SadTab(content::WebContents* web_contents, SadTabKind kind); |
+ |
+ private: |
+ content::WebContents* web_contents_; |
+ SadTabKind kind_; |
+ bool want_feedback_; |
+ |
+#if DCHECK_IS_ON() |
+ bool recorded_paint_ = false; |
+#endif |
- // Closes the Sad tab. |
- virtual void Close() = 0; |
+ DISALLOW_COPY_AND_ASSIGN(SadTab); |
}; |
} // namespace chrome |