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 <stddef.h> | 7 #include <stddef.h> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/debug/alias.h" | 12 #include "base/debug/alias.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/themes/theme_properties.h" | 16 #include "chrome/browser/themes/theme_properties.h" |
17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/layout_constants.h" | 18 #include "chrome/browser/ui/layout_constants.h" |
19 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 19 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
20 #include "chrome/browser/ui/tabs/tab_utils.h" | 20 #include "chrome/browser/ui/tabs/tab_utils.h" |
21 #include "chrome/browser/ui/view_ids.h" | 21 #include "chrome/browser/ui/view_ids.h" |
22 #include "chrome/browser/ui/views/tabs/alert_indicator_button.h" | 22 #include "chrome/browser/ui/views/tabs/alert_indicator_button.h" |
23 #include "chrome/browser/ui/views/tabs/tab_controller.h" | 23 #include "chrome/browser/ui/views/tabs/tab_controller.h" |
24 #include "chrome/browser/ui/views/touch_uma/touch_uma.h" | 24 #include "chrome/browser/ui/views/touch_uma/touch_uma.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/url_constants.h" |
26 #include "chrome/grit/generated_resources.h" | 27 #include "chrome/grit/generated_resources.h" |
27 #include "content/public/browser/user_metrics.h" | 28 #include "content/public/browser/user_metrics.h" |
| 29 #include "content/public/common/url_constants.h" |
28 #include "grit/components_scaled_resources.h" | 30 #include "grit/components_scaled_resources.h" |
29 #include "grit/components_strings.h" | 31 #include "grit/components_strings.h" |
30 #include "grit/theme_resources.h" | 32 #include "grit/theme_resources.h" |
31 #include "third_party/skia/include/effects/SkGradientShader.h" | 33 #include "third_party/skia/include/effects/SkGradientShader.h" |
32 #include "third_party/skia/include/pathops/SkPathOps.h" | 34 #include "third_party/skia/include/pathops/SkPathOps.h" |
33 #include "ui/accessibility/ax_view_state.h" | 35 #include "ui/accessibility/ax_view_state.h" |
34 #include "ui/base/l10n/l10n_util.h" | 36 #include "ui/base/l10n/l10n_util.h" |
35 #include "ui/base/material_design/material_design_controller.h" | 37 #include "ui/base/material_design/material_design_controller.h" |
36 #include "ui/base/models/list_selection_model.h" | 38 #include "ui/base/models/list_selection_model.h" |
37 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 const SkColor colors[2] = { color, SkColorSetA(color, 0) }; | 132 const SkColor colors[2] = { color, SkColorSetA(color, 0) }; |
131 SkPaint paint; | 133 SkPaint paint; |
132 paint.setAntiAlias(true); | 134 paint.setAntiAlias(true); |
133 paint.setShader(SkGradientShader::MakeRadial(p, radius, colors, nullptr, 2, | 135 paint.setShader(SkGradientShader::MakeRadial(p, radius, colors, nullptr, 2, |
134 SkShader::kClamp_TileMode)); | 136 SkShader::kClamp_TileMode)); |
135 canvas->sk_canvas()->drawRect( | 137 canvas->sk_canvas()->drawRect( |
136 SkRect::MakeXYWH(p.x() - radius, p.y() - radius, radius * 2, radius * 2), | 138 SkRect::MakeXYWH(p.x() - radius, p.y() - radius, radius * 2, radius * 2), |
137 paint); | 139 paint); |
138 } | 140 } |
139 | 141 |
| 142 // Returns whether the favicon for the given URL should be colored according to |
| 143 // the browser theme. |
| 144 bool ShouldThemifyFaviconForUrl(const GURL& url) { |
| 145 return url.SchemeIs(content::kChromeUIScheme) && |
| 146 url.host() != chrome::kChromeUIHelpHost && |
| 147 url.host() != chrome::kChromeUIUberHost; |
| 148 } |
| 149 |
140 } // namespace | 150 } // namespace |
141 | 151 |
142 //////////////////////////////////////////////////////////////////////////////// | 152 //////////////////////////////////////////////////////////////////////////////// |
143 // FaviconCrashAnimation | 153 // FaviconCrashAnimation |
144 // | 154 // |
145 // A custom animation subclass to manage the favicon crash animation. | 155 // A custom animation subclass to manage the favicon crash animation. |
146 class Tab::FaviconCrashAnimation : public gfx::LinearAnimation, | 156 class Tab::FaviconCrashAnimation : public gfx::LinearAnimation, |
147 public gfx::AnimationDelegate { | 157 public gfx::AnimationDelegate { |
148 public: | 158 public: |
149 explicit FaviconCrashAnimation(Tab* target) | 159 explicit FaviconCrashAnimation(Tab* target) |
150 : gfx::LinearAnimation(1000, 25, this), | 160 : gfx::LinearAnimation(1000, 25, this), |
151 target_(target) { | 161 target_(target) { |
152 } | 162 } |
153 ~FaviconCrashAnimation() override {} | 163 ~FaviconCrashAnimation() override {} |
154 | 164 |
155 // gfx::Animation overrides: | 165 // gfx::Animation overrides: |
156 void AnimateToState(double state) override { | 166 void AnimateToState(double state) override { |
157 const double kHidingOffset = | 167 const double kHidingOffset = |
158 Tab::GetMinimumInactiveSize().height() - GetLayoutInsets(TAB).height(); | 168 Tab::GetMinimumInactiveSize().height() - GetLayoutInsets(TAB).height(); |
159 | 169 |
160 if (state < .5) { | 170 if (state < .5) { |
161 // Animate the normal icon down. | 171 // Animate the normal icon down. |
162 target_->SetFaviconHidingOffset( | 172 target_->SetFaviconHidingOffset( |
163 static_cast<int>(floor(kHidingOffset * 2.0 * state))); | 173 static_cast<int>(floor(kHidingOffset * 2.0 * state))); |
164 } else { | 174 } else { |
165 // Animate the crashed icon up. | 175 // Animate the crashed icon up. |
166 target_->set_should_display_crashed_favicon(); | 176 target_->SetShouldDisplayCrashedFavicon(true); |
167 target_->SetFaviconHidingOffset( | 177 target_->SetFaviconHidingOffset( |
168 static_cast<int>( | 178 static_cast<int>( |
169 floor(kHidingOffset - ((state - .5) * 2.0 * kHidingOffset)))); | 179 floor(kHidingOffset - ((state - .5) * 2.0 * kHidingOffset)))); |
170 } | 180 } |
171 } | 181 } |
172 | 182 |
173 private: | 183 private: |
174 Tab* target_; | 184 Tab* target_; |
175 | 185 |
176 DISALLOW_COPY_AND_ASSIGN(FaviconCrashAnimation); | 186 DISALLOW_COPY_AND_ASSIGN(FaviconCrashAnimation); |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 title = data_.loading ? | 613 title = data_.loading ? |
604 l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE) : | 614 l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE) : |
605 CoreTabHelper::GetDefaultTitle(); | 615 CoreTabHelper::GetDefaultTitle(); |
606 } else { | 616 } else { |
607 Browser::FormatTitleForDisplay(&title); | 617 Browser::FormatTitleForDisplay(&title); |
608 } | 618 } |
609 title_->SetText(title); | 619 title_->SetText(title); |
610 | 620 |
611 if (!data_.IsCrashed()) { | 621 if (!data_.IsCrashed()) { |
612 crash_icon_animation_->Stop(); | 622 crash_icon_animation_->Stop(); |
613 should_display_crashed_favicon_ = false; | 623 SetShouldDisplayCrashedFavicon(false); |
614 favicon_hiding_offset_ = 0; | 624 favicon_hiding_offset_ = 0; |
615 } else if (!should_display_crashed_favicon_ && | 625 } else if (!should_display_crashed_favicon_ && |
616 !crash_icon_animation_->is_animating()) { | 626 !crash_icon_animation_->is_animating()) { |
617 data_.alert_state = TabAlertState::NONE; | 627 data_.alert_state = TabAlertState::NONE; |
618 crash_icon_animation_->Start(); | 628 crash_icon_animation_->Start(); |
619 } | 629 } |
620 | 630 |
621 if (data_.alert_state != old.alert_state) | 631 if (data_.alert_state != old.alert_state) |
622 alert_indicator_button_->TransitionToAlertState(data_.alert_state); | 632 alert_indicator_button_->TransitionToAlertState(data_.alert_state); |
623 | 633 |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 // provided vertical space. | 985 // provided vertical space. |
976 title_->SetBoundsRect( | 986 title_->SetBoundsRect( |
977 gfx::Rect(title_left, lb.y(), std::max(title_width, 0), lb.height())); | 987 gfx::Rect(title_left, lb.y(), std::max(title_width, 0), lb.height())); |
978 } | 988 } |
979 title_->SetVisible(show_title); | 989 title_->SetVisible(show_title); |
980 } | 990 } |
981 | 991 |
982 void Tab::OnThemeChanged() { | 992 void Tab::OnThemeChanged() { |
983 LoadTabImages(); | 993 LoadTabImages(); |
984 OnButtonColorMaybeChanged(); | 994 OnButtonColorMaybeChanged(); |
| 995 favicon_ = gfx::ImageSkia(); |
985 } | 996 } |
986 | 997 |
987 const char* Tab::GetClassName() const { | 998 const char* Tab::GetClassName() const { |
988 return kViewClassName; | 999 return kViewClassName; |
989 } | 1000 } |
990 | 1001 |
991 bool Tab::GetTooltipText(const gfx::Point& p, base::string16* tooltip) const { | 1002 bool Tab::GetTooltipText(const gfx::Point& p, base::string16* tooltip) const { |
992 // Note: Anything that affects the tooltip text should be accounted for when | 1003 // Note: Anything that affects the tooltip text should be accounted for when |
993 // calling TooltipTextChanged() from Tab::DataChanged(). | 1004 // calling TooltipTextChanged() from Tab::DataChanged(). |
994 *tooltip = chrome::AssembleTabTooltipText(data_.title, data_.alert_state); | 1005 *tooltip = chrome::AssembleTabTooltipText(data_.title, data_.alert_state); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 const int ideal_delta = width() - GetPinnedWidth(); | 1168 const int ideal_delta = width() - GetPinnedWidth(); |
1158 const int ideal_x = (GetPinnedWidth() - bounds->width()) / 2; | 1169 const int ideal_x = (GetPinnedWidth() - bounds->width()) / 2; |
1159 bounds->set_x( | 1170 bounds->set_x( |
1160 bounds->x() + static_cast<int>( | 1171 bounds->x() + static_cast<int>( |
1161 (1 - static_cast<float>(ideal_delta) / | 1172 (1 - static_cast<float>(ideal_delta) / |
1162 static_cast<float>(kPinnedTabExtraWidthToRenderAsNormal)) * | 1173 static_cast<float>(kPinnedTabExtraWidthToRenderAsNormal)) * |
1163 (ideal_x - bounds->x()))); | 1174 (ideal_x - bounds->x()))); |
1164 } | 1175 } |
1165 | 1176 |
1166 void Tab::DataChanged(const TabRendererData& old) { | 1177 void Tab::DataChanged(const TabRendererData& old) { |
| 1178 // We may overzealously reset the favicon cache here but this check eliminates |
| 1179 // at least some unnecessary re-computations and fixes the behavior of |
| 1180 // about:crash. |
| 1181 if (!old.favicon.BackedBySameObjectAs(data().favicon)) |
| 1182 favicon_ = gfx::ImageSkia(); |
| 1183 |
1167 if (data().alert_state != old.alert_state || data().title != old.title) | 1184 if (data().alert_state != old.alert_state || data().title != old.title) |
1168 TooltipTextChanged(); | 1185 TooltipTextChanged(); |
1169 | 1186 |
1170 if (data().blocked == old.blocked) | 1187 if (data().blocked == old.blocked) |
1171 return; | 1188 return; |
1172 | 1189 |
1173 if (data().blocked) | 1190 if (data().blocked) |
1174 StartPulse(); | 1191 StartPulse(); |
1175 else | 1192 else |
1176 StopPulse(); | 1193 StopPulse(); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 // by incrementing by the top padding, since it's a simple rectangle. | 1433 // by incrementing by the top padding, since it's a simple rectangle. |
1417 canvas->TileImageInt(*fill_image, x_offset + mask_images_.l_width, | 1434 canvas->TileImageInt(*fill_image, x_offset + mask_images_.l_width, |
1418 y_offset + tab_insets.top(), mask_images_.l_width, | 1435 y_offset + tab_insets.top(), mask_images_.l_width, |
1419 tab_insets.top(), | 1436 tab_insets.top(), |
1420 width() - mask_images_.l_width - mask_images_.r_width, | 1437 width() - mask_images_.l_width - mask_images_.r_width, |
1421 height() - tab_insets.top() - toolbar_overlap); | 1438 height() - tab_insets.top() - toolbar_overlap); |
1422 } | 1439 } |
1423 | 1440 |
1424 void Tab::PaintPinnedTabTitleChangedIndicatorAndIcon( | 1441 void Tab::PaintPinnedTabTitleChangedIndicatorAndIcon( |
1425 gfx::Canvas* canvas, | 1442 gfx::Canvas* canvas, |
1426 const gfx::ImageSkia& favicon, | |
1427 const gfx::Rect& favicon_draw_bounds) { | 1443 const gfx::Rect& favicon_draw_bounds) { |
1428 // The pinned tab title changed indicator consists of two parts: | 1444 // The pinned tab title changed indicator consists of two parts: |
1429 // . a clear (totally transparent) part over the bottom right (or left in rtl) | 1445 // . a clear (totally transparent) part over the bottom right (or left in rtl) |
1430 // of the favicon. This is done by drawing the favicon to a canvas, then | 1446 // of the favicon. This is done by drawing the favicon to a canvas, then |
1431 // drawing the clear part on top of the favicon. | 1447 // drawing the clear part on top of the favicon. |
1432 // . a circle in the bottom right (or left in rtl) of the favicon. | 1448 // . a circle in the bottom right (or left in rtl) of the favicon. |
1433 if (!favicon.isNull()) { | 1449 if (!favicon_.isNull()) { |
1434 const float kIndicatorCropRadius = 4.5; | 1450 const float kIndicatorCropRadius = 4.5; |
1435 gfx::Canvas icon_canvas(gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize), | 1451 gfx::Canvas icon_canvas(gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize), |
1436 canvas->image_scale(), false); | 1452 canvas->image_scale(), false); |
1437 icon_canvas.DrawImageInt(favicon, 0, 0); | 1453 icon_canvas.DrawImageInt(favicon_, 0, 0); |
1438 SkPaint clear_paint; | 1454 SkPaint clear_paint; |
1439 clear_paint.setAntiAlias(true); | 1455 clear_paint.setAntiAlias(true); |
1440 clear_paint.setXfermodeMode(SkXfermode::kClear_Mode); | 1456 clear_paint.setXfermodeMode(SkXfermode::kClear_Mode); |
1441 const int circle_x = base::i18n::IsRTL() ? 0 : gfx::kFaviconSize; | 1457 const int circle_x = base::i18n::IsRTL() ? 0 : gfx::kFaviconSize; |
1442 icon_canvas.DrawCircle(gfx::PointF(circle_x, gfx::kFaviconSize), | 1458 icon_canvas.DrawCircle(gfx::PointF(circle_x, gfx::kFaviconSize), |
1443 kIndicatorCropRadius, clear_paint); | 1459 kIndicatorCropRadius, clear_paint); |
1444 canvas->DrawImageInt(gfx::ImageSkia(icon_canvas.ExtractImageRep()), 0, 0, | 1460 canvas->DrawImageInt(gfx::ImageSkia(icon_canvas.ExtractImageRep()), 0, 0, |
1445 favicon_draw_bounds.width(), | 1461 favicon_draw_bounds.width(), |
1446 favicon_draw_bounds.height(), favicon_draw_bounds.x(), | 1462 favicon_draw_bounds.height(), favicon_draw_bounds.x(), |
1447 favicon_draw_bounds.y(), favicon_draw_bounds.width(), | 1463 favicon_draw_bounds.y(), favicon_draw_bounds.width(), |
(...skipping 15 matching lines...) Expand all Loading... |
1463 } | 1479 } |
1464 | 1480 |
1465 void Tab::PaintIcon(gfx::Canvas* canvas) { | 1481 void Tab::PaintIcon(gfx::Canvas* canvas) { |
1466 gfx::Rect bounds = favicon_bounds_; | 1482 gfx::Rect bounds = favicon_bounds_; |
1467 bounds.set_x(GetMirroredXForRect(bounds)); | 1483 bounds.set_x(GetMirroredXForRect(bounds)); |
1468 bounds.Offset(0, favicon_hiding_offset_); | 1484 bounds.Offset(0, favicon_hiding_offset_); |
1469 bounds.Intersect(GetContentsBounds()); | 1485 bounds.Intersect(GetContentsBounds()); |
1470 if (bounds.IsEmpty()) | 1486 if (bounds.IsEmpty()) |
1471 return; | 1487 return; |
1472 | 1488 |
1473 if (data().network_state != TabRendererData::NETWORK_STATE_NONE) { | 1489 // Throbber will do its own painting. |
1474 // Throbber will do its own painting. | 1490 if (data().network_state != TabRendererData::NETWORK_STATE_NONE) |
1475 return; | 1491 return; |
| 1492 |
| 1493 // Ensure that |favicon_| is created. |
| 1494 if (favicon_.isNull()) { |
| 1495 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
| 1496 favicon_ = should_display_crashed_favicon_ |
| 1497 ? *rb->GetImageSkiaNamed(IDR_CRASH_SAD_FAVICON) |
| 1498 : data().favicon; |
| 1499 // Themify the icon if it's a chrome:// page or if it's the sadtab favicon. |
| 1500 // This ensures chrome:// pages are visible over the tab background. This is |
| 1501 // similar to code in the bookmarks bar. |
| 1502 if (!favicon_.isNull() && |
| 1503 (should_display_crashed_favicon_ || |
| 1504 favicon_.BackedBySameObjectAs( |
| 1505 *rb->GetImageSkiaNamed(IDR_DEFAULT_FAVICON)) || |
| 1506 ShouldThemifyFaviconForUrl(data().url))) { |
| 1507 favicon_ = gfx::ImageSkiaOperations::CreateHSLShiftedImage( |
| 1508 favicon_, GetThemeProvider()->GetTint(ThemeProperties::TINT_BUTTONS)); |
| 1509 } |
1476 } | 1510 } |
1477 const gfx::ImageSkia& favicon = | |
1478 should_display_crashed_favicon_ | |
1479 ? *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | |
1480 IDR_CRASH_SAD_FAVICON) | |
1481 : data().favicon; | |
1482 | 1511 |
1483 if (showing_pinned_tab_title_changed_indicator_ && | 1512 if (showing_pinned_tab_title_changed_indicator_ && |
1484 !should_display_crashed_favicon_) { | 1513 !should_display_crashed_favicon_) { |
1485 PaintPinnedTabTitleChangedIndicatorAndIcon(canvas, favicon, bounds); | 1514 PaintPinnedTabTitleChangedIndicatorAndIcon(canvas, bounds); |
1486 } else if (!favicon.isNull()) { | 1515 } else if (!favicon_.isNull()) { |
1487 canvas->DrawImageInt(favicon, 0, 0, bounds.width(), bounds.height(), | 1516 canvas->DrawImageInt(favicon_, 0, 0, bounds.width(), bounds.height(), |
1488 bounds.x(), bounds.y(), bounds.width(), | 1517 bounds.x(), bounds.y(), bounds.width(), |
1489 bounds.height(), false); | 1518 bounds.height(), false); |
1490 } | 1519 } |
1491 } | 1520 } |
1492 | 1521 |
1493 void Tab::AdvanceLoadingAnimation() { | 1522 void Tab::AdvanceLoadingAnimation() { |
1494 const TabRendererData::NetworkState state = data().network_state; | 1523 const TabRendererData::NetworkState state = data().network_state; |
1495 if (controller_->IsImmersiveStyle()) { | 1524 if (controller_->IsImmersiveStyle()) { |
1496 throbber_->SetVisible(false); | 1525 throbber_->SetVisible(false); |
1497 if (state == TabRendererData::NETWORK_STATE_WAITING) { | 1526 if (state == TabRendererData::NETWORK_STATE_WAITING) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 const double offset = | 1620 const double offset = |
1592 is_selected ? (kSelectedTabThrobScale * kHoverOpacity) : kHoverOpacity; | 1621 is_selected ? (kSelectedTabThrobScale * kHoverOpacity) : kHoverOpacity; |
1593 | 1622 |
1594 if (pulse_animation_->is_animating()) | 1623 if (pulse_animation_->is_animating()) |
1595 val += pulse_animation_->GetCurrentValue() * offset; | 1624 val += pulse_animation_->GetCurrentValue() * offset; |
1596 else if (hover_controller_.ShouldDraw()) | 1625 else if (hover_controller_.ShouldDraw()) |
1597 val += hover_controller_.GetAnimationValue() * offset; | 1626 val += hover_controller_.GetAnimationValue() * offset; |
1598 return val; | 1627 return val; |
1599 } | 1628 } |
1600 | 1629 |
| 1630 void Tab::SetShouldDisplayCrashedFavicon(bool value) { |
| 1631 if (value == should_display_crashed_favicon_) |
| 1632 return; |
| 1633 |
| 1634 should_display_crashed_favicon_ = value; |
| 1635 favicon_ = gfx::ImageSkia(); |
| 1636 } |
| 1637 |
1601 void Tab::SetFaviconHidingOffset(int offset) { | 1638 void Tab::SetFaviconHidingOffset(int offset) { |
1602 favicon_hiding_offset_ = offset; | 1639 favicon_hiding_offset_ = offset; |
1603 ScheduleIconPaint(); | 1640 ScheduleIconPaint(); |
1604 } | 1641 } |
1605 | 1642 |
1606 void Tab::OnButtonColorMaybeChanged() { | 1643 void Tab::OnButtonColorMaybeChanged() { |
1607 // The theme provider may be null if we're not currently in a widget | 1644 // The theme provider may be null if we're not currently in a widget |
1608 // hierarchy. | 1645 // hierarchy. |
1609 const ui::ThemeProvider* theme_provider = GetThemeProvider(); | 1646 const ui::ThemeProvider* theme_provider = GetThemeProvider(); |
1610 if (!theme_provider) | 1647 if (!theme_provider) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); | 1782 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); |
1746 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); | 1783 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); |
1747 inactive_images_.l_width = inactive_images_.image_l->width(); | 1784 inactive_images_.l_width = inactive_images_.image_l->width(); |
1748 inactive_images_.r_width = inactive_images_.image_r->width(); | 1785 inactive_images_.r_width = inactive_images_.image_r->width(); |
1749 | 1786 |
1750 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); | 1787 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); |
1751 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); | 1788 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); |
1752 mask_images_.l_width = mask_images_.image_l->width(); | 1789 mask_images_.l_width = mask_images_.image_l->width(); |
1753 mask_images_.r_width = mask_images_.image_r->width(); | 1790 mask_images_.r_width = mask_images_.image_r->width(); |
1754 } | 1791 } |
OLD | NEW |