| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SAD_TAB_H_ | 5 #ifndef CHROME_BROWSER_UI_SAD_TAB_H_ |
| 6 #define CHROME_BROWSER_UI_SAD_TAB_H_ | 6 #define CHROME_BROWSER_UI_SAD_TAB_H_ |
| 7 | 7 |
| 8 #include "base/process/kill.h" | 8 #include "base/process/kill.h" |
| 9 #include "chrome/browser/ui/sad_tab_types.h" | 9 #include "chrome/browser/ui/sad_tab_types.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 virtual ~SadTab() {} | 31 virtual ~SadTab() {} |
| 32 | 32 |
| 33 // These functions return resource string IDs for UI text. They may be | 33 // These functions return resource string IDs for UI text. They may be |
| 34 // different for each sad tab. (Right now, the first sad tab in a session | 34 // different for each sad tab. (Right now, the first sad tab in a session |
| 35 // suggests reloading and subsequent ones suggest sending feedback.) | 35 // suggests reloading and subsequent ones suggest sending feedback.) |
| 36 int GetTitle(); | 36 int GetTitle(); |
| 37 int GetMessage(); | 37 int GetMessage(); |
| 38 int GetButtonTitle(); | 38 int GetButtonTitle(); |
| 39 int GetHelpLinkTitle(); | 39 int GetHelpLinkTitle(); |
| 40 | 40 |
| 41 // Returns the resource string Id for bullet point |line_id| or 0 if no |
| 42 // message should be displayed for the |line_id|. Line ids count from 0. |
| 43 int GetSubMessage(size_t line_id); |
| 44 |
| 41 // Returns the target of the "Learn more" link. Use it for the context menu | 45 // Returns the target of the "Learn more" link. Use it for the context menu |
| 42 // and to show the URL on hover, but call PerformAction() for regular clicks. | 46 // and to show the URL on hover, but call PerformAction() for regular clicks. |
| 43 const char* GetHelpLinkURL(); | 47 const char* GetHelpLinkURL(); |
| 44 | 48 |
| 45 // Virtual for testing. | 49 // Virtual for testing. |
| 46 virtual void RecordFirstPaint(); | 50 virtual void RecordFirstPaint(); |
| 47 virtual void PerformAction(Action); | 51 virtual void PerformAction(Action); |
| 48 | 52 |
| 49 protected: | 53 protected: |
| 50 SadTab(content::WebContents* web_contents, SadTabKind kind); | 54 SadTab(content::WebContents* web_contents, SadTabKind kind); |
| 51 | 55 |
| 52 private: | 56 private: |
| 53 content::WebContents* web_contents_; | 57 content::WebContents* web_contents_; |
| 54 SadTabKind kind_; | 58 SadTabKind kind_; |
| 55 bool show_feedback_button_; | 59 bool show_feedback_button_; |
| 56 bool recorded_paint_; | 60 bool recorded_paint_; |
| 57 | 61 |
| 58 DISALLOW_COPY_AND_ASSIGN(SadTab); | 62 DISALLOW_COPY_AND_ASSIGN(SadTab); |
| 59 }; | 63 }; |
| 60 | 64 |
| 61 } // namespace chrome | 65 } // namespace chrome |
| 62 | 66 |
| 63 #endif // CHROME_BROWSER_UI_SAD_TAB_H_ | 67 #endif // CHROME_BROWSER_UI_SAD_TAB_H_ |
| OLD | NEW |