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 return controller_->GetAccessibleTabName(tab); | |
sky
2017/01/03 23:11:41
You should only call to controller_ if tab is in t
edwardjung
2017/01/05 16:59:45
Done.
| |
1330 } | |
1331 | |
1327 int TabStrip::GetBackgroundResourceId(bool* custom_image) const { | 1332 int TabStrip::GetBackgroundResourceId(bool* custom_image) const { |
1328 const ui::ThemeProvider* tp = GetThemeProvider(); | 1333 const ui::ThemeProvider* tp = GetThemeProvider(); |
1329 | 1334 |
1330 if (GetWidget()->ShouldWindowContentsBeTransparent()) { | 1335 if (GetWidget()->ShouldWindowContentsBeTransparent()) { |
1331 const int kBackgroundIdGlass = IDR_THEME_TAB_BACKGROUND_V; | 1336 const int kBackgroundIdGlass = IDR_THEME_TAB_BACKGROUND_V; |
1332 *custom_image = tp->HasCustomImage(kBackgroundIdGlass); | 1337 *custom_image = tp->HasCustomImage(kBackgroundIdGlass); |
1333 return kBackgroundIdGlass; | 1338 return kBackgroundIdGlass; |
1334 } | 1339 } |
1335 | 1340 |
1336 // If a custom theme does not provide a replacement tab background, but does | 1341 // 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); | 2800 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
2796 if (view) | 2801 if (view) |
2797 return view; | 2802 return view; |
2798 } | 2803 } |
2799 Tab* tab = FindTabForEvent(point); | 2804 Tab* tab = FindTabForEvent(point); |
2800 if (tab) | 2805 if (tab) |
2801 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2806 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
2802 } | 2807 } |
2803 return this; | 2808 return this; |
2804 } | 2809 } |
OLD | NEW |