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 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/tabs/tab_utils.h" | 9 #include "chrome/browser/ui/tabs/tab_utils.h" |
10 #include "chrome/browser/ui/views/tabs/media_indicator_button.h" | 10 #include "chrome/browser/ui/views/tabs/media_indicator_button.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 ~FakeTabController() override {} | 25 ~FakeTabController() override {} |
26 | 26 |
27 void set_immersive_style(bool value) { immersive_style_ = value; } | 27 void set_immersive_style(bool value) { immersive_style_ = value; } |
28 void set_active_tab(bool value) { active_tab_ = value; } | 28 void set_active_tab(bool value) { active_tab_ = value; } |
29 | 29 |
30 const ui::ListSelectionModel& GetSelectionModel() override { | 30 const ui::ListSelectionModel& GetSelectionModel() override { |
31 return selection_model_; | 31 return selection_model_; |
32 } | 32 } |
33 bool SupportsMultipleSelection() override { return false; } | 33 bool SupportsMultipleSelection() override { return false; } |
34 bool ShouldHideCloseButtonForInactiveTab(const Tab* tab) override { | 34 bool ShouldHideCloseButtonForInactiveTabs() override { |
35 return false; | 35 return false; |
36 } | 36 } |
37 void SelectTab(Tab* tab) override {} | 37 void SelectTab(Tab* tab) override {} |
38 void ExtendSelectionTo(Tab* tab) override {} | 38 void ExtendSelectionTo(Tab* tab) override {} |
39 void ToggleSelected(Tab* tab) override {} | 39 void ToggleSelected(Tab* tab) override {} |
40 void AddSelectionFromAnchorTo(Tab* tab) override {} | 40 void AddSelectionFromAnchorTo(Tab* tab) override {} |
41 void CloseTab(Tab* tab, CloseTabSource source) override {} | 41 void CloseTab(Tab* tab, CloseTabSource source) override {} |
42 void ToggleTabAudioMute(Tab* tab) override {} | 42 void ToggleTabAudioMute(Tab* tab) override {} |
43 void ShowContextMenuForTab(Tab* tab, | 43 void ShowContextMenuForTab(Tab* tab, |
44 const gfx::Point& p, | 44 const gfx::Point& p, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 EXPECT_EQ(50, tab.close_button_->bounds().height()); | 387 EXPECT_EQ(50, tab.close_button_->bounds().height()); |
388 } | 388 } |
389 | 389 |
390 // Test in both a LTR and a RTL locale. Note: The fact that the UI code is | 390 // Test in both a LTR and a RTL locale. Note: The fact that the UI code is |
391 // configured for an RTL locale does *not* change how the coordinates are | 391 // configured for an RTL locale does *not* change how the coordinates are |
392 // examined in the tests above because views::View and friends are supposed to | 392 // examined in the tests above because views::View and friends are supposed to |
393 // auto-mirror the widgets when painting. Thus, what we're testing here is that | 393 // auto-mirror the widgets when painting. Thus, what we're testing here is that |
394 // there's no code in Tab that will erroneously subvert this automatic | 394 // there's no code in Tab that will erroneously subvert this automatic |
395 // coordinate translation. http://crbug.com/384179 | 395 // coordinate translation. http://crbug.com/384179 |
396 INSTANTIATE_TEST_CASE_P(, TabTest, ::testing::Values(false, true)); | 396 INSTANTIATE_TEST_CASE_P(, TabTest, ::testing::Values(false, true)); |
OLD | NEW |