| OLD | NEW |
| 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_VIEWS_TABS_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ |
| 7 | 7 |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/tabs/tab_strip_model.h" | 9 #include "chrome/browser/tabs/tab_strip_model.h" |
| 10 #include "chrome/browser/views/tabs/base_tab_strip.h" | 10 #include "chrome/browser/views/tabs/base_tab_strip.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 // Accessors for the model and individual Tabs. | 55 // Accessors for the model and individual Tabs. |
| 56 TabStripModel* model() const { return model_; } | 56 TabStripModel* model() const { return model_; } |
| 57 | 57 |
| 58 // Destroys the active drag controller. | 58 // Destroys the active drag controller. |
| 59 void DestroyDragController(); | 59 void DestroyDragController(); |
| 60 | 60 |
| 61 // Removes the drag source Tab from this TabStrip, and deletes it. | 61 // Removes the drag source Tab from this TabStrip, and deletes it. |
| 62 void DestroyDraggedSourceTab(Tab* tab); | 62 void DestroyDraggedSourceTab(Tab* tab); |
| 63 | 63 |
| 64 // Retrieve the ideal bounds for the Tab at the specified index. | 64 // Retrieves the ideal bounds for the Tab at the specified index. |
| 65 gfx::Rect GetIdealBounds(int index); | 65 gfx::Rect GetIdealBounds(int index); |
| 66 | 66 |
| 67 // Returns the currently selected tab. | 67 // Returns the currently selected tab. |
| 68 Tab* GetSelectedTab() const; | 68 Tab* GetSelectedTab() const; |
| 69 | 69 |
| 70 // Create the new tab button. | 70 // Creates the new tab button. |
| 71 void InitTabStripButtons(); | 71 void InitTabStripButtons(); |
| 72 | 72 |
| 73 // Return true if this tab strip is compatible with the provided tab strip. | 73 // Return true if this tab strip is compatible with the provided tab strip. |
| 74 // Compatible tab strips can transfer tabs during drag and drop. | 74 // Compatible tab strips can transfer tabs during drag and drop. |
| 75 bool IsCompatibleWith(TabStrip* other) const; | 75 bool IsCompatibleWith(TabStrip* other) const; |
| 76 | 76 |
| 77 // Returns the bounds of the new tab button. |
| 78 gfx::Rect GetNewTabButtonBounds(); |
| 79 |
| 77 // BaseTabStrip implementation: | 80 // BaseTabStrip implementation: |
| 78 virtual int GetPreferredHeight(); | 81 virtual int GetPreferredHeight(); |
| 79 virtual void SetBackgroundOffset(const gfx::Point& offset); | 82 virtual void SetBackgroundOffset(const gfx::Point& offset); |
| 80 virtual bool IsPositionInWindowCaption(const gfx::Point& point); | 83 virtual bool IsPositionInWindowCaption(const gfx::Point& point); |
| 81 virtual void SetDraggedTabBounds(int tab_index, | 84 virtual void SetDraggedTabBounds(int tab_index, |
| 82 const gfx::Rect& tab_bounds); | 85 const gfx::Rect& tab_bounds); |
| 83 virtual bool IsDragSessionActive() const; | 86 virtual bool IsDragSessionActive() const; |
| 84 virtual void UpdateLoadingAnimations(); | 87 virtual void UpdateLoadingAnimations(); |
| 85 virtual bool IsAnimating() const; | 88 virtual bool IsAnimating() const; |
| 86 virtual TabStrip* AsTabStrip(); | 89 virtual TabStrip* AsTabStrip(); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 }; | 406 }; |
| 404 std::vector<TabData> tab_data_; | 407 std::vector<TabData> tab_data_; |
| 405 | 408 |
| 406 // The currently running animation. | 409 // The currently running animation. |
| 407 scoped_ptr<TabAnimation> active_animation_; | 410 scoped_ptr<TabAnimation> active_animation_; |
| 408 | 411 |
| 409 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 412 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
| 410 }; | 413 }; |
| 411 | 414 |
| 412 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ | 415 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ |
| OLD | NEW |