OLD | NEW |
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // Stops any ongoing animations. If |layout| is true and an animation is | 206 // Stops any ongoing animations. If |layout| is true and an animation is |
207 // ongoing this does a layout. | 207 // ongoing this does a layout. |
208 void StopAnimating(bool layout); | 208 void StopAnimating(bool layout); |
209 | 209 |
210 // Called to indicate whether the given URL is a supported file. | 210 // Called to indicate whether the given URL is a supported file. |
211 void FileSupported(const GURL& url, bool supported); | 211 void FileSupported(const GURL& url, bool supported); |
212 | 212 |
213 // TabController overrides: | 213 // TabController overrides: |
214 const ui::ListSelectionModel& GetSelectionModel() override; | 214 const ui::ListSelectionModel& GetSelectionModel() override; |
215 bool SupportsMultipleSelection() override; | 215 bool SupportsMultipleSelection() override; |
216 bool ShouldHideCloseButtonForInactiveTab(const Tab* tab) override; | 216 bool ShouldHideCloseButtonForInactiveTabs() override; |
217 void SelectTab(Tab* tab) override; | 217 void SelectTab(Tab* tab) override; |
218 void ExtendSelectionTo(Tab* tab) override; | 218 void ExtendSelectionTo(Tab* tab) override; |
219 void ToggleSelected(Tab* tab) override; | 219 void ToggleSelected(Tab* tab) override; |
220 void AddSelectionFromAnchorTo(Tab* tab) override; | 220 void AddSelectionFromAnchorTo(Tab* tab) override; |
221 void CloseTab(Tab* tab, CloseTabSource source) override; | 221 void CloseTab(Tab* tab, CloseTabSource source) override; |
222 void ToggleTabAudioMute(Tab* tab) override; | 222 void ToggleTabAudioMute(Tab* tab) override; |
223 void ShowContextMenuForTab(Tab* tab, | 223 void ShowContextMenuForTab(Tab* tab, |
224 const gfx::Point& p, | 224 const gfx::Point& p, |
225 ui::MenuSourceType source_type) override; | 225 ui::MenuSourceType source_type) override; |
226 bool IsActiveTab(const Tab* tab) const override; | 226 bool IsActiveTab(const Tab* tab) const override; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 private: | 264 private: |
265 typedef std::vector<Tab*> Tabs; | 265 typedef std::vector<Tab*> Tabs; |
266 typedef std::map<int, Tabs> TabsClosingMap; | 266 typedef std::map<int, Tabs> TabsClosingMap; |
267 typedef std::pair<TabsClosingMap::iterator, | 267 typedef std::pair<TabsClosingMap::iterator, |
268 Tabs::iterator> FindClosingTabResult; | 268 Tabs::iterator> FindClosingTabResult; |
269 | 269 |
270 class RemoveTabDelegate; | 270 class RemoveTabDelegate; |
271 | 271 |
272 friend class TabDragController; | 272 friend class TabDragController; |
273 friend class TabDragControllerTest; | 273 friend class TabDragControllerTest; |
| 274 friend class TabStripTest; |
274 FRIEND_TEST_ALL_PREFIXES(TabDragControllerTest, GestureEndShouldEndDragTest); | 275 FRIEND_TEST_ALL_PREFIXES(TabDragControllerTest, GestureEndShouldEndDragTest); |
275 friend class TabStripTest; | 276 friend class TabStripTest; |
276 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); | 277 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); |
277 FRIEND_TEST_ALL_PREFIXES(TabStripTest, ClippedTabCloseButton); | 278 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked); |
278 | 279 |
279 // Used during a drop session of a url. Tracks the position of the drop as | 280 // Used during a drop session of a url. Tracks the position of the drop as |
280 // well as a window used to highlight where the drop occurs. | 281 // well as a window used to highlight where the drop occurs. |
281 struct DropInfo { | 282 struct DropInfo { |
282 DropInfo(int drop_index, | 283 DropInfo(int drop_index, |
283 bool drop_before, | 284 bool drop_before, |
284 bool point_down, | 285 bool point_down, |
285 views::Widget* context); | 286 views::Widget* context); |
286 ~DropInfo(); | 287 ~DropInfo(); |
287 | 288 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 bool immersive_style_; | 674 bool immersive_style_; |
674 | 675 |
675 // Our observers. | 676 // Our observers. |
676 typedef ObserverList<TabStripObserver> TabStripObservers; | 677 typedef ObserverList<TabStripObserver> TabStripObservers; |
677 TabStripObservers observers_; | 678 TabStripObservers observers_; |
678 | 679 |
679 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 680 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
680 }; | 681 }; |
681 | 682 |
682 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 683 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |