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 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 9 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
10 #include "ui/base/models/list_selection_model.h" | 10 #include "ui/base/models/list_selection_model.h" |
11 | 11 |
12 class TabStrip; | 12 class TabStrip; |
13 | 13 |
14 class FakeBaseTabStripController : public TabStripController { | 14 class FakeBaseTabStripController : public TabStripController { |
15 public: | 15 public: |
16 FakeBaseTabStripController(); | 16 FakeBaseTabStripController(); |
17 virtual ~FakeBaseTabStripController(); | 17 virtual ~FakeBaseTabStripController(); |
18 | 18 |
19 void AddTab(int index, bool is_active); | 19 void AddTab(int index, bool is_active); |
20 void RemoveTab(int index); | 20 void RemoveTab(int index); |
21 | 21 |
22 void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; } | 22 void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; } |
23 | 23 |
24 // TabStripController overrides: | 24 // TabStripController overrides: |
25 virtual const ui::ListSelectionModel& GetSelectionModel() OVERRIDE; | 25 virtual const ui::ListSelectionModel& GetSelectionModel() override; |
26 virtual int GetCount() const OVERRIDE; | 26 virtual int GetCount() const override; |
27 virtual bool IsValidIndex(int index) const OVERRIDE; | 27 virtual bool IsValidIndex(int index) const override; |
28 virtual bool IsActiveTab(int index) const OVERRIDE; | 28 virtual bool IsActiveTab(int index) const override; |
29 virtual int GetActiveIndex() const OVERRIDE; | 29 virtual int GetActiveIndex() const override; |
30 virtual bool IsTabSelected(int index) const OVERRIDE; | 30 virtual bool IsTabSelected(int index) const override; |
31 virtual bool IsTabPinned(int index) const OVERRIDE; | 31 virtual bool IsTabPinned(int index) const override; |
32 virtual bool IsNewTabPage(int index) const OVERRIDE; | 32 virtual bool IsNewTabPage(int index) const override; |
33 virtual void SelectTab(int index) OVERRIDE; | 33 virtual void SelectTab(int index) override; |
34 virtual void ExtendSelectionTo(int index) OVERRIDE; | 34 virtual void ExtendSelectionTo(int index) override; |
35 virtual void ToggleSelected(int index) OVERRIDE; | 35 virtual void ToggleSelected(int index) override; |
36 virtual void AddSelectionFromAnchorTo(int index) OVERRIDE; | 36 virtual void AddSelectionFromAnchorTo(int index) override; |
37 virtual void CloseTab(int index, CloseTabSource source) OVERRIDE; | 37 virtual void CloseTab(int index, CloseTabSource source) override; |
38 virtual void ToggleTabAudioMute(int index) OVERRIDE; | 38 virtual void ToggleTabAudioMute(int index) override; |
39 virtual void ShowContextMenuForTab(Tab* tab, | 39 virtual void ShowContextMenuForTab(Tab* tab, |
40 const gfx::Point& p, | 40 const gfx::Point& p, |
41 ui::MenuSourceType source_type) OVERRIDE; | 41 ui::MenuSourceType source_type) override; |
42 virtual void UpdateLoadingAnimations() OVERRIDE; | 42 virtual void UpdateLoadingAnimations() override; |
43 virtual int HasAvailableDragActions() const OVERRIDE; | 43 virtual int HasAvailableDragActions() const override; |
44 virtual void OnDropIndexUpdate(int index, bool drop_before) OVERRIDE; | 44 virtual void OnDropIndexUpdate(int index, bool drop_before) override; |
45 virtual void PerformDrop(bool drop_before, | 45 virtual void PerformDrop(bool drop_before, |
46 int index, | 46 int index, |
47 const GURL& url) OVERRIDE; | 47 const GURL& url) override; |
48 virtual bool IsCompatibleWith(TabStrip* other) const OVERRIDE; | 48 virtual bool IsCompatibleWith(TabStrip* other) const override; |
49 virtual void CreateNewTab() OVERRIDE; | 49 virtual void CreateNewTab() override; |
50 virtual void CreateNewTabWithLocation(const base::string16& loc) OVERRIDE; | 50 virtual void CreateNewTabWithLocation(const base::string16& loc) override; |
51 virtual bool IsIncognito() OVERRIDE; | 51 virtual bool IsIncognito() override; |
52 virtual void StackedLayoutMaybeChanged() OVERRIDE; | 52 virtual void StackedLayoutMaybeChanged() override; |
53 virtual void OnStartedDraggingTabs() OVERRIDE; | 53 virtual void OnStartedDraggingTabs() override; |
54 virtual void OnStoppedDraggingTabs() OVERRIDE; | 54 virtual void OnStoppedDraggingTabs() override; |
55 virtual void CheckFileSupported(const GURL& url) OVERRIDE; | 55 virtual void CheckFileSupported(const GURL& url) override; |
56 | 56 |
57 private: | 57 private: |
58 TabStrip* tab_strip_; | 58 TabStrip* tab_strip_; |
59 | 59 |
60 int num_tabs_; | 60 int num_tabs_; |
61 int active_index_; | 61 int active_index_; |
62 | 62 |
63 ui::ListSelectionModel selection_model_; | 63 ui::ListSelectionModel selection_model_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController); | 65 DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController); |
66 }; | 66 }; |
67 | 67 |
68 #endif // CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ | 68 #endif // CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |