OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 class SidebarContainer; |
| 10 class TabContentsWrapper; |
| 11 |
| 12 // Abstract sidebar tab strip model interface. |
| 13 // NOTE: All indices used by this class are in model coordinates. |
| 14 class SidebarTabStripController { |
| 15 public: |
| 16 // An interface to receive sidebar tab strip change notifications. |
| 17 class Delegate { |
| 18 public: |
| 19 virtual ~Delegate() {} |
| 20 |
| 21 // Sidebar tab strip view bounds are changed, the hosting window should be |
| 22 // updated accordingly. |
| 23 virtual void OnSidebarTabStripBoundsChanged(bool is_animating) = 0; |
| 24 }; |
| 25 |
| 26 virtual ~SidebarTabStripController() {} |
| 27 |
| 28 // Returns true if sidebar is expanded. |
| 29 virtual bool IsSidebarExpanded() = 0; |
| 30 |
| 31 // Returns true if the selected index is selected. |
| 32 virtual bool IsTabSelected(int model_index) = 0; |
| 33 |
| 34 // Select the tab at the specified index in the model. |
| 35 virtual void SelectTab(int model_index) = 0; |
| 36 |
| 37 // Show sidebar mini tabs registered for |tab|. |
| 38 virtual void UpdateTabs(TabContentsWrapper* tab) = 0; |
| 39 |
| 40 // Sidebar state (icon, title etc.) has changed. |
| 41 virtual void UpdateState(const SidebarContainer* sidebar) = 0; |
| 42 |
| 43 // Sidebar loading state changed, loading progress indicator |
| 44 // needs to be updated. |
| 45 virtual void UpdateLoadingState(const SidebarContainer* sidebar) = 0; |
| 46 |
| 47 // Sidebar tab strip view bounds are changed, hosting window should be updated |
| 48 // accordingly. |
| 49 virtual void TabStripBoundsChanged(bool is_animating) = 0; |
| 50 }; |
| 51 |
| 52 #endif // CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_CONTROLLER_H_ |
| 53 |
OLD | NEW |