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_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 } | 1317 } |
1318 | 1318 |
1319 bool TabStrip::IsImmersiveStyle() const { | 1319 bool TabStrip::IsImmersiveStyle() const { |
1320 return immersive_style_; | 1320 return immersive_style_; |
1321 } | 1321 } |
1322 | 1322 |
1323 SkColor TabStrip::GetToolbarTopSeparatorColor() const { | 1323 SkColor TabStrip::GetToolbarTopSeparatorColor() const { |
1324 return controller_->GetToolbarTopSeparatorColor(); | 1324 return controller_->GetToolbarTopSeparatorColor(); |
1325 } | 1325 } |
1326 | 1326 |
| 1327 // Returns the accessible tab name for the tab. |
| 1328 base::string16 TabStrip::GetAccessibleTabName(const Tab* tab) const { |
| 1329 int model_index = GetModelIndexOfTab(tab); |
| 1330 if (IsValidModelIndex(model_index)) |
| 1331 return controller_->GetAccessibleTabName(tab); |
| 1332 return base::string16(); |
| 1333 } |
| 1334 |
1327 int TabStrip::GetBackgroundResourceId(bool* custom_image) const { | 1335 int TabStrip::GetBackgroundResourceId(bool* custom_image) const { |
1328 const ui::ThemeProvider* tp = GetThemeProvider(); | 1336 const ui::ThemeProvider* tp = GetThemeProvider(); |
1329 | 1337 |
1330 if (GetWidget()->ShouldWindowContentsBeTransparent()) { | 1338 if (GetWidget()->ShouldWindowContentsBeTransparent()) { |
1331 const int kBackgroundIdGlass = IDR_THEME_TAB_BACKGROUND_V; | 1339 const int kBackgroundIdGlass = IDR_THEME_TAB_BACKGROUND_V; |
1332 *custom_image = tp->HasCustomImage(kBackgroundIdGlass); | 1340 *custom_image = tp->HasCustomImage(kBackgroundIdGlass); |
1333 return kBackgroundIdGlass; | 1341 return kBackgroundIdGlass; |
1334 } | 1342 } |
1335 | 1343 |
1336 // If a custom theme does not provide a replacement tab background, but does | 1344 // If a custom theme does not provide a replacement tab background, but does |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2795 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2803 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
2796 if (view) | 2804 if (view) |
2797 return view; | 2805 return view; |
2798 } | 2806 } |
2799 Tab* tab = FindTabForEvent(point); | 2807 Tab* tab = FindTabForEvent(point); |
2800 if (tab) | 2808 if (tab) |
2801 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2809 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
2802 } | 2810 } |
2803 return this; | 2811 return this; |
2804 } | 2812 } |
OLD | NEW |