Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Unified Diff: chrome/browser/back_forward_menu_model.h

Issue 126092: Begin to upgrade BackForwardMenuModelViews to use new menu API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/back_forward_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | chrome/browser/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698