| Index: chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| index fbea79181cffde93269c514cc3bebcdaf6356a83..0fdd35626edf64fb39b92570eacac0ed3bcc1065 100644
|
| --- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| +++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| @@ -289,10 +289,10 @@ int BackForwardMenuModel::GetHistoryItemCount() const {
|
|
|
| if (model_type_ == FORWARD_MENU) {
|
| // Only count items from n+1 to end (if n is current entry)
|
| - items = contents->GetController().entry_count() -
|
| - contents->GetController().GetCurrentEntryIndex() - 1;
|
| + items = contents->controller().entry_count() -
|
| + contents->controller().GetCurrentEntryIndex() - 1;
|
| } else {
|
| - items = contents->GetController().GetCurrentEntryIndex();
|
| + items = contents->controller().GetCurrentEntryIndex();
|
| }
|
|
|
| if (items > kMaxHistoryItems)
|
| @@ -307,7 +307,7 @@ int BackForwardMenuModel::GetChapterStopCount(int history_items) const {
|
| TabContents* contents = GetTabContents();
|
|
|
| int chapter_stops = 0;
|
| - int current_entry = contents->GetController().GetCurrentEntryIndex();
|
| + int current_entry = contents->controller().GetCurrentEntryIndex();
|
|
|
| if (history_items == kMaxHistoryItems) {
|
| int chapter_id = current_entry;
|
| @@ -331,7 +331,7 @@ int BackForwardMenuModel::GetChapterStopCount(int history_items) const {
|
| int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from,
|
| bool forward) const {
|
| TabContents* contents = GetTabContents();
|
| - NavigationController& controller = contents->GetController();
|
| + NavigationController& controller = contents->controller();
|
|
|
| int max_count = controller.entry_count();
|
| if (start_from < 0 || start_from >= max_count)
|
| @@ -383,7 +383,7 @@ int BackForwardMenuModel::FindChapterStop(int offset,
|
| offset *= -1;
|
|
|
| TabContents* contents = GetTabContents();
|
| - int entry = contents->GetController().GetCurrentEntryIndex() + offset;
|
| + int entry = contents->controller().GetCurrentEntryIndex() + offset;
|
| for (int i = 0; i < skip + 1; i++)
|
| entry = GetIndexOfNextChapterStop(entry, forward);
|
|
|
| @@ -417,10 +417,10 @@ int BackForwardMenuModel::MenuIndexToNavEntryIndex(int index) const {
|
| // Convert anything above the History items separator.
|
| if (index < history_items) {
|
| if (model_type_ == FORWARD_MENU) {
|
| - index += contents->GetController().GetCurrentEntryIndex() + 1;
|
| + index += contents->controller().GetCurrentEntryIndex() + 1;
|
| } else {
|
| // Back menu is reverse.
|
| - index = contents->GetController().GetCurrentEntryIndex() - (index + 1);
|
| + index = contents->controller().GetCurrentEntryIndex() - (index + 1);
|
| }
|
| return index;
|
| }
|
| @@ -440,7 +440,7 @@ int BackForwardMenuModel::MenuIndexToNavEntryIndex(int index) const {
|
|
|
| NavigationEntry* BackForwardMenuModel::GetNavigationEntry(int index) const {
|
| int controller_index = MenuIndexToNavEntryIndex(index);
|
| - NavigationController& controller = GetTabContents()->GetController();
|
| + NavigationController& controller = GetTabContents()->controller();
|
| if (controller_index >= 0 && controller_index < controller.entry_count())
|
| return controller.GetEntryAtIndex(controller_index);
|
|
|
|
|