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

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

Issue 1001003: Allow dynamic switching in and out of sidetabs mode. (Closed) Base URL: svn://svn.chromium.org/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
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;
226 }; 232 };
227 233
228 //////////////////////////////////////////////////////////////////////////////// 234 ////////////////////////////////////////////////////////////////////////////////
229 // 235 //
230 // TabStripModel 236 // TabStripModel
231 // 237 //
232 // A model & low level controller of a Browser Window tabstrip. Holds a vector 238 // A model & low level controller of a Browser Window tabstrip. Holds a vector
233 // of TabContents, and provides an API for adding, removing and shuffling 239 // of TabContents, and provides an API for adding, removing and shuffling
234 // them, as well as a higher level API for doing specific Browser-related 240 // them, as well as a higher level API for doing specific Browser-related
235 // tasks like adding new Tabs from just a URL, etc. 241 // tasks like adding new Tabs from just a URL, etc.
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 CommandNewTab, 546 CommandNewTab,
541 CommandReload, 547 CommandReload,
542 CommandDuplicate, 548 CommandDuplicate,
543 CommandCloseTab, 549 CommandCloseTab,
544 CommandCloseOtherTabs, 550 CommandCloseOtherTabs,
545 CommandCloseTabsToRight, 551 CommandCloseTabsToRight,
546 CommandCloseTabsOpenedBy, 552 CommandCloseTabsOpenedBy,
547 CommandRestoreTab, 553 CommandRestoreTab,
548 CommandTogglePinned, 554 CommandTogglePinned,
549 CommandBookmarkAllTabs, 555 CommandBookmarkAllTabs,
556 CommandUseVerticalTabs,
550 CommandLast 557 CommandLast
551 }; 558 };
552 559
553 // Returns true if the specified command is enabled. 560 // Returns true if the specified command is enabled.
554 bool IsContextMenuCommandEnabled(int context_index, 561 bool IsContextMenuCommandEnabled(int context_index,
555 ContextMenuCommand command_id) const; 562 ContextMenuCommand command_id) const;
556 563
564 // Returns true if the specified command is checked.
565 bool IsContextMenuCommandChecked(int context_index,
566 ContextMenuCommand command_id) const;
567
557 // Performs the action associated with the specified command for the given 568 // Performs the action associated with the specified command for the given
558 // TabStripModel index |context_index|. 569 // TabStripModel index |context_index|.
559 void ExecuteContextMenuCommand(int context_index, 570 void ExecuteContextMenuCommand(int context_index,
560 ContextMenuCommand command_id); 571 ContextMenuCommand command_id);
561 572
562 // Returns a vector of indices of TabContentses opened from the TabContents 573 // Returns a vector of indices of TabContentses opened from the TabContents
563 // at the specified |index|. 574 // at the specified |index|.
564 std::vector<int> GetIndexesOpenedBy(int index) const; 575 std::vector<int> GetIndexesOpenedBy(int index) const;
565 576
566 // Overridden from notificationObserver: 577 // Overridden from notificationObserver:
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 typedef ObserverList<TabStripModelObserver> TabStripModelObservers; 740 typedef ObserverList<TabStripModelObserver> TabStripModelObservers;
730 TabStripModelObservers observers_; 741 TabStripModelObservers observers_;
731 742
732 // A scoped container for notification registries. 743 // A scoped container for notification registries.
733 NotificationRegistrar registrar_; 744 NotificationRegistrar registrar_;
734 745
735 DISALLOW_COPY_AND_ASSIGN(TabStripModel); 746 DISALLOW_COPY_AND_ASSIGN(TabStripModel);
736 }; 747 };
737 748
738 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ 749 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698