| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 250 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
| 251 virtual void OnDragExited() OVERRIDE; | 251 virtual void OnDragExited() OVERRIDE; |
| 252 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 252 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
| 253 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 253 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| 254 virtual views::View* GetTooltipHandlerForPoint( | 254 virtual views::View* GetTooltipHandlerForPoint( |
| 255 const gfx::Point& point) OVERRIDE; | 255 const gfx::Point& point) OVERRIDE; |
| 256 | 256 |
| 257 // Returns preferred height in immersive style. | 257 // Returns preferred height in immersive style. |
| 258 static int GetImmersiveHeight(); | 258 static int GetImmersiveHeight(); |
| 259 | 259 |
| 260 // The size of the new tab button must be hardcoded because we need to be |
| 261 // able to lay it out before we are able to get its image from the |
| 262 // ui::ThemeProvider. It also makes sense to do this, because the size of the |
| 263 // new tab button should not need to be calculated dynamically. |
| 264 static const int kNewTabButtonAssetWidth; |
| 265 static const int kNewTabButtonAssetHeight; |
| 266 |
| 260 private: | 267 private: |
| 261 typedef std::vector<Tab*> Tabs; | 268 typedef std::vector<Tab*> Tabs; |
| 262 typedef std::map<int, Tabs> TabsClosingMap; | 269 typedef std::map<int, Tabs> TabsClosingMap; |
| 263 typedef std::pair<TabsClosingMap::iterator, | 270 typedef std::pair<TabsClosingMap::iterator, |
| 264 Tabs::iterator> FindClosingTabResult; | 271 Tabs::iterator> FindClosingTabResult; |
| 265 | 272 |
| 266 class RemoveTabDelegate; | 273 class RemoveTabDelegate; |
| 267 | 274 |
| 268 friend class TabDragController; | 275 friend class TabDragController; |
| 269 friend class TabDragControllerTest; | 276 friend class TabDragControllerTest; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // Whether the MIME type of the file pointed to by |url| is supported. | 310 // Whether the MIME type of the file pointed to by |url| is supported. |
| 304 bool file_supported; | 311 bool file_supported; |
| 305 | 312 |
| 306 private: | 313 private: |
| 307 DISALLOW_COPY_AND_ASSIGN(DropInfo); | 314 DISALLOW_COPY_AND_ASSIGN(DropInfo); |
| 308 }; | 315 }; |
| 309 | 316 |
| 310 // Horizontal gap between mini and non-mini-tabs. | 317 // Horizontal gap between mini and non-mini-tabs. |
| 311 static const int kMiniToNonMiniGap; | 318 static const int kMiniToNonMiniGap; |
| 312 | 319 |
| 313 // The size of the new tab button must be hardcoded because we need to be | |
| 314 // able to lay it out before we are able to get its image from the | |
| 315 // ui::ThemeProvider. It also makes sense to do this, because the size of the | |
| 316 // new tab button should not need to be calculated dynamically. | |
| 317 static const int kNewTabButtonAssetWidth; | |
| 318 static const int kNewTabButtonAssetHeight; | |
| 319 | |
| 320 void Init(); | 320 void Init(); |
| 321 | 321 |
| 322 // Creates and returns a new tab. The caller owners the returned tab. | 322 // Creates and returns a new tab. The caller owners the returned tab. |
| 323 Tab* CreateTab(); | 323 Tab* CreateTab(); |
| 324 | 324 |
| 325 // Invoked from |AddTabAt| after the newly created tab has been inserted. | 325 // Invoked from |AddTabAt| after the newly created tab has been inserted. |
| 326 void StartInsertTabAnimation(int model_index); | 326 void StartInsertTabAnimation(int model_index); |
| 327 | 327 |
| 328 // Invoked from |MoveTab| after |tab_data_| has been updated to animate the | 328 // Invoked from |MoveTab| after |tab_data_| has been updated to animate the |
| 329 // move. | 329 // move. |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 bool immersive_style_; | 678 bool immersive_style_; |
| 679 | 679 |
| 680 // Our observers. | 680 // Our observers. |
| 681 typedef ObserverList<TabStripObserver> TabStripObservers; | 681 typedef ObserverList<TabStripObserver> TabStripObservers; |
| 682 TabStripObservers observers_; | 682 TabStripObservers observers_; |
| 683 | 683 |
| 684 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 684 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
| 685 }; | 685 }; |
| 686 | 686 |
| 687 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 687 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
| OLD | NEW |