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

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

Issue 1141005: Revert r42156, r42157, r42160. Allow dynamic switching in and out of sidetabs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_menu_model.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ 5 #ifndef CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_
6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ 6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 // Returns whether some contents can be closed. 217 // Returns whether some contents can be closed.
218 virtual bool CanCloseContentsAt(int index) = 0; 218 virtual bool CanCloseContentsAt(int index) = 0;
219 219
220 // Returns true if we should allow "bookmark all tabs" in this window; this is 220 // Returns true if we should allow "bookmark all tabs" in this window; this is
221 // true when there is more than one bookmarkable tab open. 221 // true when there is more than one bookmarkable tab open.
222 virtual bool CanBookmarkAllTabs() const = 0; 222 virtual bool CanBookmarkAllTabs() const = 0;
223 223
224 // Creates a bookmark folder containing a bookmark for all open tabs. 224 // Creates a bookmark folder containing a bookmark for all open tabs.
225 virtual void BookmarkAllTabs() = 0; 225 virtual void BookmarkAllTabs() = 0;
226
227 // Returns true if the vertical tabstrip presentation should be used.
228 virtual bool UseVerticalTabs() const = 0;
229
230 // Toggles the use of the vertical tabstrip.
231 virtual void ToggleUseVerticalTabs() = 0;
232 }; 226 };
233 227
234 //////////////////////////////////////////////////////////////////////////////// 228 ////////////////////////////////////////////////////////////////////////////////
235 // 229 //
236 // TabStripModel 230 // TabStripModel
237 // 231 //
238 // A model & low level controller of a Browser Window tabstrip. Holds a vector 232 // A model & low level controller of a Browser Window tabstrip. Holds a vector
239 // of TabContents, and provides an API for adding, removing and shuffling 233 // of TabContents, and provides an API for adding, removing and shuffling
240 // them, as well as a higher level API for doing specific Browser-related 234 // them, as well as a higher level API for doing specific Browser-related
241 // tasks like adding new Tabs from just a URL, etc. 235 // tasks like adding new Tabs from just a URL, etc.
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 CommandNewTab, 540 CommandNewTab,
547 CommandReload, 541 CommandReload,
548 CommandDuplicate, 542 CommandDuplicate,
549 CommandCloseTab, 543 CommandCloseTab,
550 CommandCloseOtherTabs, 544 CommandCloseOtherTabs,
551 CommandCloseTabsToRight, 545 CommandCloseTabsToRight,
552 CommandCloseTabsOpenedBy, 546 CommandCloseTabsOpenedBy,
553 CommandRestoreTab, 547 CommandRestoreTab,
554 CommandTogglePinned, 548 CommandTogglePinned,
555 CommandBookmarkAllTabs, 549 CommandBookmarkAllTabs,
556 CommandUseVerticalTabs,
557 CommandLast 550 CommandLast
558 }; 551 };
559 552
560 // Returns true if the specified command is enabled. 553 // Returns true if the specified command is enabled.
561 bool IsContextMenuCommandEnabled(int context_index, 554 bool IsContextMenuCommandEnabled(int context_index,
562 ContextMenuCommand command_id) const; 555 ContextMenuCommand command_id) const;
563 556
564 // Returns true if the specified command is checked.
565 bool IsContextMenuCommandChecked(int context_index,
566 ContextMenuCommand command_id) const;
567
568 // Performs the action associated with the specified command for the given 557 // Performs the action associated with the specified command for the given
569 // TabStripModel index |context_index|. 558 // TabStripModel index |context_index|.
570 void ExecuteContextMenuCommand(int context_index, 559 void ExecuteContextMenuCommand(int context_index,
571 ContextMenuCommand command_id); 560 ContextMenuCommand command_id);
572 561
573 // Returns a vector of indices of TabContentses opened from the TabContents 562 // Returns a vector of indices of TabContentses opened from the TabContents
574 // at the specified |index|. 563 // at the specified |index|.
575 std::vector<int> GetIndexesOpenedBy(int index) const; 564 std::vector<int> GetIndexesOpenedBy(int index) const;
576 565
577 // Overridden from notificationObserver: 566 // Overridden from notificationObserver:
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 typedef ObserverList<TabStripModelObserver> TabStripModelObservers; 729 typedef ObserverList<TabStripModelObserver> TabStripModelObservers;
741 TabStripModelObservers observers_; 730 TabStripModelObservers observers_;
742 731
743 // A scoped container for notification registries. 732 // A scoped container for notification registries.
744 NotificationRegistrar registrar_; 733 NotificationRegistrar registrar_;
745 734
746 DISALLOW_COPY_AND_ASSIGN(TabStripModel); 735 DISALLOW_COPY_AND_ASSIGN(TabStripModel);
747 }; 736 };
748 737
749 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ 738 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_menu_model.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698