| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_OVERVIEW_GRID_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_GRID_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_GRID_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_GRID_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/browser/views/tabs/grid.h" | 9 #include "chrome/browser/views/tabs/grid.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Returns true if a drag is underway and the drag is in the process of | 23 // Returns true if a drag is underway and the drag is in the process of |
| 24 // modifying the tab strip model. | 24 // modifying the tab strip model. |
| 25 bool modifying_model() const; | 25 bool modifying_model() const; |
| 26 | 26 |
| 27 // Returns the TabOverviewCell at the specified index. | 27 // Returns the TabOverviewCell at the specified index. |
| 28 TabOverviewCell* GetTabOverviewCellAt(int index); | 28 TabOverviewCell* GetTabOverviewCellAt(int index); |
| 29 | 29 |
| 30 // Cancels the drag. Does nothing if a drag is not underway. | 30 // Cancels the drag. Does nothing if a drag is not underway. |
| 31 void CancelDrag(); | 31 void CancelDrag(); |
| 32 | 32 |
| 33 // If a drag is under way, this invokes Drag on the DragController with the |
| 34 // current position of the mouse. |
| 35 void UpdateDragController(); |
| 36 |
| 33 // View overrides. | 37 // View overrides. |
| 34 virtual bool OnMousePressed(const views::MouseEvent& event); | 38 virtual bool OnMousePressed(const views::MouseEvent& event); |
| 35 virtual bool OnMouseDragged(const views::MouseEvent& event); | 39 virtual bool OnMouseDragged(const views::MouseEvent& event); |
| 36 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); | 40 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); |
| 37 | 41 |
| 42 // AnimationDelegate overrides. |
| 43 virtual void AnimationEnded(const Animation* animation); |
| 44 virtual void AnimationProgressed(const Animation* animation); |
| 45 virtual void AnimationCanceled(const Animation* animation); |
| 46 |
| 38 private: | 47 private: |
| 39 TabOverviewController* controller_; | 48 TabOverviewController* controller_; |
| 40 | 49 |
| 41 scoped_ptr<TabOverviewDragController> drag_controller_; | 50 scoped_ptr<TabOverviewDragController> drag_controller_; |
| 42 | 51 |
| 43 DISALLOW_COPY_AND_ASSIGN(TabOverviewGrid); | 52 DISALLOW_COPY_AND_ASSIGN(TabOverviewGrid); |
| 44 }; | 53 }; |
| 45 | 54 |
| 46 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_GRID_H_ | 55 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_GRID_H_ |
| OLD | NEW |