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 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" | 5 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" | 7 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" |
8 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 8 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
9 | 9 |
10 FakeBaseTabStripController::FakeBaseTabStripController() : num_tabs_(0) { | 10 FakeBaseTabStripController::FakeBaseTabStripController() : num_tabs_(0) { |
11 } | 11 } |
12 | 12 |
13 FakeBaseTabStripController::~FakeBaseTabStripController() { | 13 FakeBaseTabStripController::~FakeBaseTabStripController() { |
14 } | 14 } |
15 | 15 |
16 void FakeBaseTabStripController::AddTab(int index) { | 16 void FakeBaseTabStripController::AddTab(int index) { |
17 num_tabs_++; | 17 num_tabs_++; |
18 tab_strip_->AddTabAt(index, TabRendererData()); | 18 tab_strip_->AddTabAt(index, TabRendererData(), false); |
19 } | 19 } |
20 | 20 |
21 void FakeBaseTabStripController::RemoveTab(int index) { | 21 void FakeBaseTabStripController::RemoveTab(int index) { |
22 num_tabs_--; | 22 num_tabs_--; |
23 tab_strip_->RemoveTabAt(index); | 23 tab_strip_->RemoveTabAt(index); |
24 } | 24 } |
25 | 25 |
26 const TabStripSelectionModel& FakeBaseTabStripController::GetSelectionModel() { | 26 const TabStripSelectionModel& FakeBaseTabStripController::GetSelectionModel() { |
27 return selection_model_; | 27 return selection_model_; |
28 } | 28 } |
29 | 29 |
30 int FakeBaseTabStripController::GetCount() const { | 30 int FakeBaseTabStripController::GetCount() const { |
31 return num_tabs_; | 31 return num_tabs_; |
32 } | 32 } |
33 | 33 |
34 bool FakeBaseTabStripController::IsValidIndex(int index) const { | 34 bool FakeBaseTabStripController::IsValidIndex(int index) const { |
35 return index >= 0 && index < num_tabs_; | 35 return index >= 0 && index < num_tabs_; |
36 } | 36 } |
37 | 37 |
38 bool FakeBaseTabStripController::IsActiveTab(int index) const { | 38 bool FakeBaseTabStripController::IsActiveTab(int index) const { |
39 return false; | 39 return false; |
40 } | 40 } |
41 | 41 |
| 42 int FakeBaseTabStripController::GetActiveIndex() const { |
| 43 return -1; |
| 44 } |
| 45 |
42 bool FakeBaseTabStripController::IsTabSelected(int index) const { | 46 bool FakeBaseTabStripController::IsTabSelected(int index) const { |
43 return false; | 47 return false; |
44 } | 48 } |
45 | 49 |
46 bool FakeBaseTabStripController::IsTabPinned(int index) const { | 50 bool FakeBaseTabStripController::IsTabPinned(int index) const { |
47 return false; | 51 return false; |
48 } | 52 } |
49 | 53 |
50 bool FakeBaseTabStripController::IsTabCloseable(int index) const { | 54 bool FakeBaseTabStripController::IsTabCloseable(int index) const { |
51 return false; | 55 return false; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 100 |
97 void FakeBaseTabStripController::CreateNewTab() { | 101 void FakeBaseTabStripController::CreateNewTab() { |
98 } | 102 } |
99 | 103 |
100 void FakeBaseTabStripController::ClickActiveTab(int index) { | 104 void FakeBaseTabStripController::ClickActiveTab(int index) { |
101 } | 105 } |
102 | 106 |
103 bool FakeBaseTabStripController::IsIncognito() { | 107 bool FakeBaseTabStripController::IsIncognito() { |
104 return false; | 108 return false; |
105 } | 109 } |
OLD | NEW |