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

Side by Side Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 3440008: Disables "Bookmark all tabs" item in the tab contex menu. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: review iteration Created 10 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/tabs/tab_strip_model.h" 5 #include "chrome/browser/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 // Close doesn't effect mini-tabs. 653 // Close doesn't effect mini-tabs.
654 return count() != IndexOfFirstNonMiniTab() && 654 return count() != IndexOfFirstNonMiniTab() &&
655 context_index < (count() - 1); 655 context_index < (count() - 1);
656 case CommandDuplicate: 656 case CommandDuplicate:
657 return delegate_->CanDuplicateContentsAt(context_index); 657 return delegate_->CanDuplicateContentsAt(context_index);
658 case CommandRestoreTab: 658 case CommandRestoreTab:
659 return delegate_->CanRestoreTab(); 659 return delegate_->CanRestoreTab();
660 case CommandTogglePinned: 660 case CommandTogglePinned:
661 return !IsAppTab(context_index); 661 return !IsAppTab(context_index);
662 case CommandBookmarkAllTabs: 662 case CommandBookmarkAllTabs:
663 return delegate_->CanBookmarkAllTabs(); 663 return browser_defaults::bookmarks_enabled &&
664 delegate_->CanBookmarkAllTabs();
664 case CommandUseVerticalTabs: 665 case CommandUseVerticalTabs:
665 return true; 666 return true;
666 default: 667 default:
667 NOTREACHED(); 668 NOTREACHED();
668 } 669 }
669 return false; 670 return false;
670 } 671 }
671 672
672 bool TabStripModel::IsContextMenuCommandChecked( 673 bool TabStripModel::IsContextMenuCommandChecked(
673 int context_index, 674 int context_index,
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 DCHECK(ContainsIndex(index)); 1068 DCHECK(ContainsIndex(index));
1068 1069
1069 TabContents* old_contents = GetContentsAt(index); 1070 TabContents* old_contents = GetContentsAt(index);
1070 1071
1071 contents_data_[index]->contents = new_contents; 1072 contents_data_[index]->contents = new_contents;
1072 1073
1073 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, 1074 FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
1074 TabReplacedAt(old_contents, new_contents, index, type)); 1075 TabReplacedAt(old_contents, new_contents, index, type));
1075 return old_contents; 1076 return old_contents;
1076 } 1077 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698