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

Unified Diff: chrome/browser/ui/toolbar/back_forward_menu_model.cc

Issue 8956050: Rename TabContents::controller() to GetController and put it into the WebContents interface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc ('k') | chrome/browser/ui/toolbar/toolbar_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/back_forward_menu_model.cc
===================================================================
--- chrome/browser/ui/toolbar/back_forward_menu_model.cc (revision 115228)
+++ chrome/browser/ui/toolbar/back_forward_menu_model.cc (working copy)
@@ -289,10 +289,10 @@
if (model_type_ == FORWARD_MENU) {
// Only count items from n+1 to end (if n is current entry)
- items = contents->controller().entry_count() -
- contents->controller().GetCurrentEntryIndex() - 1;
+ items = contents->GetController().entry_count() -
+ contents->GetController().GetCurrentEntryIndex() - 1;
} else {
- items = contents->controller().GetCurrentEntryIndex();
+ items = contents->GetController().GetCurrentEntryIndex();
}
if (items > kMaxHistoryItems)
@@ -307,7 +307,7 @@
TabContents* contents = GetTabContents();
int chapter_stops = 0;
- int current_entry = contents->controller().GetCurrentEntryIndex();
+ int current_entry = contents->GetController().GetCurrentEntryIndex();
if (history_items == kMaxHistoryItems) {
int chapter_id = current_entry;
@@ -331,7 +331,7 @@
int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from,
bool forward) const {
TabContents* contents = GetTabContents();
- NavigationController& controller = contents->controller();
+ NavigationController& controller = contents->GetController();
int max_count = controller.entry_count();
if (start_from < 0 || start_from >= max_count)
@@ -383,7 +383,7 @@
offset *= -1;
TabContents* contents = GetTabContents();
- int entry = contents->controller().GetCurrentEntryIndex() + offset;
+ int entry = contents->GetController().GetCurrentEntryIndex() + offset;
for (int i = 0; i < skip + 1; i++)
entry = GetIndexOfNextChapterStop(entry, forward);
@@ -417,10 +417,10 @@
// Convert anything above the History items separator.
if (index < history_items) {
if (model_type_ == FORWARD_MENU) {
- index += contents->controller().GetCurrentEntryIndex() + 1;
+ index += contents->GetController().GetCurrentEntryIndex() + 1;
} else {
// Back menu is reverse.
- index = contents->controller().GetCurrentEntryIndex() - (index + 1);
+ index = contents->GetController().GetCurrentEntryIndex() - (index + 1);
}
return index;
}
@@ -440,7 +440,7 @@
NavigationEntry* BackForwardMenuModel::GetNavigationEntry(int index) const {
int controller_index = MenuIndexToNavEntryIndex(index);
- NavigationController& controller = GetTabContents()->controller();
+ NavigationController& controller = GetTabContents()->GetController();
if (controller_index >= 0 && controller_index < controller.entry_count())
return controller.GetEntryAtIndex(controller_index);
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc ('k') | chrome/browser/ui/toolbar/toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698