| 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/tab.h" | 5 #include "chrome/browser/ui/views/tabs/tab.h" |
| 6 #include "chrome/browser/ui/views/tabs/tab_controller.h" | 6 #include "chrome/browser/ui/views/tabs/tab_controller.h" |
| 7 | 7 |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/base/models/list_selection_model.h" | 10 #include "ui/base/models/list_selection_model.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 virtual const ui::ListSelectionModel& GetSelectionModel() OVERRIDE { | 25 virtual const ui::ListSelectionModel& GetSelectionModel() OVERRIDE { |
| 26 return selection_model_; | 26 return selection_model_; |
| 27 } | 27 } |
| 28 virtual bool SupportsMultipleSelection() OVERRIDE { return false; } | 28 virtual bool SupportsMultipleSelection() OVERRIDE { return false; } |
| 29 virtual void SelectTab(Tab* tab) OVERRIDE {} | 29 virtual void SelectTab(Tab* tab) OVERRIDE {} |
| 30 virtual void ExtendSelectionTo(Tab* tab) OVERRIDE {} | 30 virtual void ExtendSelectionTo(Tab* tab) OVERRIDE {} |
| 31 virtual void ToggleSelected(Tab* tab) OVERRIDE {} | 31 virtual void ToggleSelected(Tab* tab) OVERRIDE {} |
| 32 virtual void AddSelectionFromAnchorTo(Tab* tab) OVERRIDE {} | 32 virtual void AddSelectionFromAnchorTo(Tab* tab) OVERRIDE {} |
| 33 virtual void CloseTab(Tab* tab, CloseTabSource source) OVERRIDE {} | 33 virtual void CloseTab(Tab* tab, CloseTabSource source) OVERRIDE {} |
| 34 virtual void ShowContextMenuForTab(Tab* tab, | 34 virtual void ShowContextMenuForTab(Tab* tab, |
| 35 const gfx::Point& p) OVERRIDE {} | 35 const gfx::Point& p, |
| 36 ui::MenuSourceType source_type) OVERRIDE {} |
| 36 virtual bool IsActiveTab(const Tab* tab) const OVERRIDE { return false; } | 37 virtual bool IsActiveTab(const Tab* tab) const OVERRIDE { return false; } |
| 37 virtual bool IsTabSelected(const Tab* tab) const OVERRIDE { | 38 virtual bool IsTabSelected(const Tab* tab) const OVERRIDE { |
| 38 return false; | 39 return false; |
| 39 } | 40 } |
| 40 virtual bool IsTabPinned(const Tab* tab) const OVERRIDE { return false; } | 41 virtual bool IsTabPinned(const Tab* tab) const OVERRIDE { return false; } |
| 41 virtual void MaybeStartDrag( | 42 virtual void MaybeStartDrag( |
| 42 Tab* tab, | 43 Tab* tab, |
| 43 const ui::LocatedEvent& event, | 44 const ui::LocatedEvent& event, |
| 44 const ui::ListSelectionModel& original_selection) OVERRIDE {} | 45 const ui::ListSelectionModel& original_selection) OVERRIDE {} |
| 45 virtual void ContinueDrag(views::View* view, | 46 virtual void ContinueDrag(views::View* view, |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 EXPECT_TRUE(IconAnimationInvariant(tab)); | 206 EXPECT_TRUE(IconAnimationInvariant(tab)); |
| 206 EXPECT_EQ(TabRendererData::CAPTURE_STATE_NONE, tab.data().capture_state); | 207 EXPECT_EQ(TabRendererData::CAPTURE_STATE_NONE, tab.data().capture_state); |
| 207 | 208 |
| 208 data.audio_state = TabRendererData::AUDIO_STATE_NONE; | 209 data.audio_state = TabRendererData::AUDIO_STATE_NONE; |
| 209 tab.SetData(data); | 210 tab.SetData(data); |
| 210 EXPECT_TRUE(IconAnimationInvariant(tab)); | 211 EXPECT_TRUE(IconAnimationInvariant(tab)); |
| 211 EXPECT_EQ(TabRendererData::AUDIO_STATE_NONE, tab.data().audio_state); | 212 EXPECT_EQ(TabRendererData::AUDIO_STATE_NONE, tab.data().audio_state); |
| 212 EXPECT_EQ(TabRendererData::CAPTURE_STATE_NONE, tab.data().capture_state); | 213 EXPECT_EQ(TabRendererData::CAPTURE_STATE_NONE, tab.data().capture_state); |
| 213 EXPECT_TRUE(IconAnimationInvariant(tab)); | 214 EXPECT_TRUE(IconAnimationInvariant(tab)); |
| 214 } | 215 } |
| OLD | NEW |