| 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_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/tabs/tab_strip_model.h" | 8 #include "chrome/browser/tabs/tab_strip_model.h" |
| 9 #include "chrome/browser/views/tabs/tab_renderer.h" | 9 #include "chrome/browser/views/tabs/tab_renderer.h" |
| 10 #include "chrome/views/base_button.h" | 10 #include "chrome/views/base_button.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 TabStripModel::ContextMenuCommand command_id, Tab* tab) = 0; | 59 TabStripModel::ContextMenuCommand command_id, Tab* tab) = 0; |
| 60 virtual void StopAllHighlighting() = 0; | 60 virtual void StopAllHighlighting() = 0; |
| 61 | 61 |
| 62 // Potentially starts a drag for the specified Tab. | 62 // Potentially starts a drag for the specified Tab. |
| 63 virtual void MaybeStartDrag(Tab* tab, const views::MouseEvent& event) = 0; | 63 virtual void MaybeStartDrag(Tab* tab, const views::MouseEvent& event) = 0; |
| 64 | 64 |
| 65 // Continues dragging a Tab. | 65 // Continues dragging a Tab. |
| 66 virtual void ContinueDrag(const views::MouseEvent& event) = 0; | 66 virtual void ContinueDrag(const views::MouseEvent& event) = 0; |
| 67 | 67 |
| 68 // Ends dragging a Tab. |canceled| is true if the drag was aborted in a way | 68 // Ends dragging a Tab. |canceled| is true if the drag was aborted in a way |
| 69 // other than the user releasing the mouse. | 69 // other than the user releasing the mouse. Returns whether the tab has been |
| 70 virtual void EndDrag(bool canceled) = 0; | 70 // destroyed. |
| 71 virtual bool EndDrag(bool canceled) = 0; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 explicit Tab(TabDelegate* delegate); | 74 explicit Tab(TabDelegate* delegate); |
| 74 virtual ~Tab(); | 75 virtual ~Tab(); |
| 75 | 76 |
| 76 // Access the delegate. | 77 // Access the delegate. |
| 77 TabDelegate* delegate() const { return delegate_; } | 78 TabDelegate* delegate() const { return delegate_; } |
| 78 | 79 |
| 79 // Used to set/check whether this Tab is being animated closed. | 80 // Used to set/check whether this Tab is being animated closed. |
| 80 void set_closing(bool closing) { closing_ = closing; } | 81 void set_closing(bool closing) { closing_ = closing; } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 bool closing_; | 126 bool closing_; |
| 126 | 127 |
| 127 // If non-null it means we're showing a menu for the tab. | 128 // If non-null it means we're showing a menu for the tab. |
| 128 ContextMenuController* menu_controller_; | 129 ContextMenuController* menu_controller_; |
| 129 | 130 |
| 130 DISALLOW_COPY_AND_ASSIGN(Tab); | 131 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_H_ | 134 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_H_ |
| 134 | 135 |
| OLD | NEW |