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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.h

Issue 291093005: Removes --enable-stacked-tab-strip flag (Stacked Tabs) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes --enable-stacked-tab-strip flag (minor refactoring) Created 6 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_VIEWS_TABS_TAB_STRIP_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 public: 57 public:
58 static const char kViewClassName[]; 58 static const char kViewClassName[];
59 59
60 explicit TabStrip(TabStripController* controller); 60 explicit TabStrip(TabStripController* controller);
61 virtual ~TabStrip(); 61 virtual ~TabStrip();
62 62
63 // Add and remove observers to changes within this TabStrip. 63 // Add and remove observers to changes within this TabStrip.
64 void AddObserver(TabStripObserver* observer); 64 void AddObserver(TabStripObserver* observer);
65 void RemoveObserver(TabStripObserver* observer); 65 void RemoveObserver(TabStripObserver* observer);
66 66
67 // Sets the layout type. If |adjust_layout| is true the layout type changes 67 // If |adjust_layout| is true the layout type changes
68 // based on whether the user uses a mouse or touch device with the tabstrip. 68 // based on whether the user uses a mouse or touch device with the tabstrip.
69 // If |adjust_layout| is false the layout is fixed to |layout_type|. 69 void set_adjust_layout(bool adjust_layout) { adjust_layout_ = adjust_layout; }
70 void SetLayoutType(TabStripLayoutType layout_type, bool adjust_layout); 70
71 TabStripLayoutType layout_type() const { return layout_type_; } 71 // Sets if the layout type is stacked.
sky 2014/05/21 22:57:19 You also need to describe what these two values me
varkha 2014/05/23 17:43:23 Done.
72 void SetLayoutTypeStacked(bool layout_type_stacked);
73 bool layout_type_stacked() const { return layout_type_stacked_; }
72 74
73 // Returns the bounds of the new tab button. 75 // Returns the bounds of the new tab button.
74 gfx::Rect GetNewTabButtonBounds(); 76 gfx::Rect GetNewTabButtonBounds();
75 77
76 // Returns true if the new tab button should be sized to the top of the tab 78 // Returns true if the new tab button should be sized to the top of the tab
77 // strip. 79 // strip.
78 bool SizeTabButtonToTopOfTabStrip(); 80 bool SizeTabButtonToTopOfTabStrip();
79 81
80 // Starts highlighting the tab at the specified index. 82 // Starts highlighting the tab at the specified index.
81 void StartHighlight(int model_index); 83 void StartHighlight(int model_index);
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 603
602 // The controller for a drag initiated from a Tab. Valid for the lifetime of 604 // The controller for a drag initiated from a Tab. Valid for the lifetime of
603 // the drag session. 605 // the drag session.
604 scoped_ptr<TabDragController> drag_controller_; 606 scoped_ptr<TabDragController> drag_controller_;
605 607
606 views::BoundsAnimator bounds_animator_; 608 views::BoundsAnimator bounds_animator_;
607 609
608 // Size we last layed out at. 610 // Size we last layed out at.
609 gfx::Size last_layout_size_; 611 gfx::Size last_layout_size_;
610 612
611 TabStripLayoutType layout_type_; 613 bool layout_type_stacked_;
sky 2014/05/21 22:57:19 How about stacked_layout_?
varkha 2014/05/23 17:43:23 Done.
612 614
613 // See description above SetLayoutType(). 615 // See description above SetLayoutType().
614 bool adjust_layout_; 616 bool adjust_layout_;
615 617
616 // Only used while in touch mode. 618 // Only used while in touch mode.
617 scoped_ptr<StackedTabStripLayout> touch_layout_; 619 scoped_ptr<StackedTabStripLayout> touch_layout_;
618 620
619 // If true the layout type is set to TAB_STRIP_LAYOUT_SHRINK when the mouse 621 // If true the layout type is set to TAB_STRIP_LAYOUT_SHRINK when the mouse
620 // exits the tabstrip (as determined using MouseWatcher). 622 // exits the tabstrip (as determined using MouseWatcher).
621 bool reset_to_shrink_on_exit_; 623 bool reset_to_shrink_on_exit_;
(...skipping 15 matching lines...) Expand all
637 bool immersive_style_; 639 bool immersive_style_;
638 640
639 // Our observers. 641 // Our observers.
640 typedef ObserverList<TabStripObserver> TabStripObservers; 642 typedef ObserverList<TabStripObserver> TabStripObservers;
641 TabStripObservers observers_; 643 TabStripObservers observers_;
642 644
643 DISALLOW_COPY_AND_ASSIGN(TabStrip); 645 DISALLOW_COPY_AND_ASSIGN(TabStrip);
644 }; 646 };
645 647
646 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 648 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698