BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / views / tabs / fake_base_tab_strip_controller.cc
blob22845aaf19ad9606d69a37f3f6fd1bc5c903d7f4
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h"
7 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h"
8 #include "chrome/browser/ui/views/tabs/tab_strip.h"
10 FakeBaseTabStripController::FakeBaseTabStripController()
11 : tab_strip_(NULL),
12 num_tabs_(0),
13 active_index_(-1) {
16 FakeBaseTabStripController::~FakeBaseTabStripController() {
19 void FakeBaseTabStripController::AddTab(int index, bool is_active) {
20 num_tabs_++;
21 tab_strip_->AddTabAt(index, TabRendererData(), is_active);
22 if (is_active)
23 active_index_ = index;
26 void FakeBaseTabStripController::RemoveTab(int index) {
27 num_tabs_--;
28 tab_strip_->RemoveTabAt(index);
29 if (active_index_ == index)
30 active_index_ = -1;
33 const ui::ListSelectionModel& FakeBaseTabStripController::GetSelectionModel() {
34 return selection_model_;
37 int FakeBaseTabStripController::GetCount() const {
38 return num_tabs_;
41 bool FakeBaseTabStripController::IsValidIndex(int index) const {
42 return index >= 0 && index < num_tabs_;
45 bool FakeBaseTabStripController::IsActiveTab(int index) const {
46 if (!IsValidIndex(index))
47 return false;
48 return active_index_ == index;
51 int FakeBaseTabStripController::GetActiveIndex() const {
52 return active_index_;
55 bool FakeBaseTabStripController::IsTabSelected(int index) const {
56 return false;
59 bool FakeBaseTabStripController::IsTabPinned(int index) const {
60 return false;
63 bool FakeBaseTabStripController::IsNewTabPage(int index) const {
64 return false;
67 void FakeBaseTabStripController::SelectTab(int index) {
68 if (!IsValidIndex(index))
69 return;
70 active_index_ = index;
73 void FakeBaseTabStripController::ExtendSelectionTo(int index) {
76 void FakeBaseTabStripController::ToggleSelected(int index) {
79 void FakeBaseTabStripController::AddSelectionFromAnchorTo(int index) {
82 void FakeBaseTabStripController::CloseTab(int index, CloseTabSource source) {
85 void FakeBaseTabStripController::ToggleTabAudioMute(int index) {
88 void FakeBaseTabStripController::ShowContextMenuForTab(
89 Tab* tab,
90 const gfx::Point& p,
91 ui::MenuSourceType source_type) {
94 void FakeBaseTabStripController::UpdateLoadingAnimations() {
97 int FakeBaseTabStripController::HasAvailableDragActions() const {
98 return 0;
101 void FakeBaseTabStripController::OnDropIndexUpdate(int index,
102 bool drop_before) {
105 void FakeBaseTabStripController::PerformDrop(bool drop_before,
106 int index,
107 const GURL& url) {
110 bool FakeBaseTabStripController::IsCompatibleWith(TabStrip* other) const {
111 return false;
114 void FakeBaseTabStripController::CreateNewTab() {
117 void FakeBaseTabStripController::CreateNewTabWithLocation(
118 const base::string16& location) {
121 bool FakeBaseTabStripController::IsIncognito() {
122 return false;
125 void FakeBaseTabStripController::StackedLayoutMaybeChanged() {
128 void FakeBaseTabStripController::OnStartedDraggingTabs() {
131 void FakeBaseTabStripController::OnStoppedDraggingTabs() {
134 void FakeBaseTabStripController::CheckFileSupported(const GURL& url) {
135 tab_strip_->FileSupported(url, true);