Chromium Code Reviews| Index: chrome/browser/back_forward_menu_model.h |
| =================================================================== |
| --- chrome/browser/back_forward_menu_model.h (revision 18347) |
| +++ chrome/browser/back_forward_menu_model.h (working copy) |
| @@ -26,15 +26,11 @@ |
| // These are IDs used to identify individual UI elements within the |
| // browser window using View::GetViewByID. |
| enum ModelType { |
| - FORWARD_MENU_DELEGATE = 1, |
| - BACKWARD_MENU_DELEGATE = 2 |
| + FORWARD_MENU = 1, |
| + BACKWARD_MENU = 2 |
| }; |
| - // Factory function. Defined in back_forward_menu_model_{platform}.cc. |
| - // This is only used in unit tests. In the browser we use the platform- |
| - // specific constructors directly. |
| - static BackForwardMenuModel* Create(Browser* browser, ModelType model_type); |
| - |
| + BackForwardMenuModel(Browser* browser, ModelType model_type); |
| virtual ~BackForwardMenuModel() { } |
| // Returns how many history items the menu should show. For example, if the |
| @@ -108,10 +104,12 @@ |
| // Does the item does something when you click on it? |
| bool ItemHasCommand(int menu_id) const; |
| +#ifdef UNIT_TEST |
| // Allows the unit test to use its own dummy tab contents. |
| void set_test_tab_contents(TabContents* test_tab_contents) { |
| test_tab_contents_ = test_tab_contents; |
| } |
| +#endif |
| // Allow the unit test to use the "Show Full History" label. |
| std::wstring GetShowFullHistoryLabel() const; |
| @@ -128,11 +126,6 @@ |
| static const int kMaxChapterStops; |
| protected: |
| - BackForwardMenuModel() |
| - : browser_(NULL), |
| - test_tab_contents_(NULL), |
| - model_type_(FORWARD_MENU_DELEGATE) {} |
| - |
| Browser* browser_; |
|
sky
2009/06/15 15:50:50
nit: while you're here, could you move the members
|
| // The unit tests will provide their own TabContents to use. |