| 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 "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 10 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
| 11 #include "ui/base/models/list_selection_model.h" | 11 #include "ui/base/models/list_selection_model.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 ~FakeBaseTabStripController() override; | 18 ~FakeBaseTabStripController() override; |
| 19 | 19 |
| 20 void AddTab(int index, bool is_active); | 20 void AddTab(int index, bool is_active); |
| 21 void AddPinnedTab(int index, bool is_active); |
| 21 void RemoveTab(int index); | 22 void RemoveTab(int index); |
| 22 | 23 |
| 23 void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; } | 24 void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; } |
| 24 | 25 |
| 25 // TabStripController overrides: | 26 // TabStripController overrides: |
| 26 const ui::ListSelectionModel& GetSelectionModel() const override; | 27 const ui::ListSelectionModel& GetSelectionModel() const override; |
| 27 int GetCount() const override; | 28 int GetCount() const override; |
| 28 bool IsValidIndex(int index) const override; | 29 bool IsValidIndex(int index) const override; |
| 29 bool IsActiveTab(int index) const override; | 30 bool IsActiveTab(int index) const override; |
| 30 int GetActiveIndex() const override; | 31 int GetActiveIndex() const override; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 58 | 59 |
| 59 int num_tabs_; | 60 int num_tabs_; |
| 60 int active_index_; | 61 int active_index_; |
| 61 | 62 |
| 62 ui::ListSelectionModel selection_model_; | 63 ui::ListSelectionModel selection_model_; |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController); | 65 DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 #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 |