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_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/tabs/tab_strip_selection_model.h" | 10 #include "chrome/browser/tabs/tab_strip_selection_model.h" |
11 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 11 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
12 | 12 |
13 class TabStrip; | 13 class TabStrip; |
14 | 14 |
15 class FakeBaseTabStripController : public TabStripController { | 15 class FakeBaseTabStripController : public TabStripController { |
16 public: | 16 public: |
17 FakeBaseTabStripController(); | 17 FakeBaseTabStripController(); |
18 virtual ~FakeBaseTabStripController(); | 18 virtual ~FakeBaseTabStripController(); |
19 | 19 |
20 void AddTab(int index); | 20 void AddTab(int index); |
21 void RemoveTab(int index); | 21 void RemoveTab(int index); |
22 | 22 |
23 void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; } | 23 void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; } |
24 | 24 |
25 // TabStripController overrides: | 25 // TabStripController overrides: |
26 virtual const TabStripSelectionModel& GetSelectionModel() OVERRIDE; | 26 virtual const TabStripSelectionModel& GetSelectionModel() OVERRIDE; |
27 virtual int GetCount() const OVERRIDE; | 27 virtual int GetCount() const OVERRIDE; |
28 virtual bool IsValidIndex(int index) const OVERRIDE; | 28 virtual bool IsValidIndex(int index) const OVERRIDE; |
29 virtual bool IsActiveTab(int index) const OVERRIDE; | 29 virtual bool IsActiveTab(int index) const OVERRIDE; |
| 30 virtual int GetActiveIndex() const OVERRIDE; |
30 virtual bool IsTabSelected(int index) const OVERRIDE; | 31 virtual bool IsTabSelected(int index) const OVERRIDE; |
31 virtual bool IsTabPinned(int index) const OVERRIDE; | 32 virtual bool IsTabPinned(int index) const OVERRIDE; |
32 virtual bool IsTabCloseable(int index) const OVERRIDE; | 33 virtual bool IsTabCloseable(int index) const OVERRIDE; |
33 virtual bool IsNewTabPage(int index) const OVERRIDE; | 34 virtual bool IsNewTabPage(int index) const OVERRIDE; |
34 virtual void SelectTab(int index) OVERRIDE; | 35 virtual void SelectTab(int index) OVERRIDE; |
35 virtual void ExtendSelectionTo(int index) OVERRIDE; | 36 virtual void ExtendSelectionTo(int index) OVERRIDE; |
36 virtual void ToggleSelected(int index) OVERRIDE; | 37 virtual void ToggleSelected(int index) OVERRIDE; |
37 virtual void AddSelectionFromAnchorTo(int index) OVERRIDE; | 38 virtual void AddSelectionFromAnchorTo(int index) OVERRIDE; |
38 virtual void CloseTab(int index) OVERRIDE; | 39 virtual void CloseTab(int index) OVERRIDE; |
39 virtual void ShowContextMenuForTab(BaseTab* tab, | 40 virtual void ShowContextMenuForTab(BaseTab* tab, |
(...skipping 13 matching lines...) Expand all Loading... |
53 TabStrip* tab_strip_; | 54 TabStrip* tab_strip_; |
54 | 55 |
55 int num_tabs_; | 56 int num_tabs_; |
56 | 57 |
57 TabStripSelectionModel selection_model_; | 58 TabStripSelectionModel selection_model_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController); | 60 DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController); |
60 }; | 61 }; |
61 | 62 |
62 #endif // CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ | 63 #endif // CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |