| 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 |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 754 |
| 755 void Tab::AnimationCanceled(const gfx::Animation* animation) { | 755 void Tab::AnimationCanceled(const gfx::Animation* animation) { |
| 756 SchedulePaint(); | 756 SchedulePaint(); |
| 757 } | 757 } |
| 758 | 758 |
| 759 void Tab::AnimationEnded(const gfx::Animation* animation) { | 759 void Tab::AnimationEnded(const gfx::Animation* animation) { |
| 760 SchedulePaint(); | 760 SchedulePaint(); |
| 761 } | 761 } |
| 762 | 762 |
| 763 //////////////////////////////////////////////////////////////////////////////// | 763 //////////////////////////////////////////////////////////////////////////////// |
| 764 // Tab, views::ButtonListener overrides: | 764 // Tab, views::ImageButtonDelegate overrides: |
| 765 | 765 |
| 766 void Tab::ButtonPressed(views::Button* sender, const ui::Event& event) { | 766 void Tab::ButtonPressed(views::Button* sender, const ui::Event& event) { |
| 767 if (!alert_indicator_button_ || !alert_indicator_button_->visible()) | 767 if (!alert_indicator_button_ || !alert_indicator_button_->visible()) |
| 768 content::RecordAction(UserMetricsAction("CloseTab_NoAlertIndicator")); | 768 content::RecordAction(UserMetricsAction("CloseTab_NoAlertIndicator")); |
| 769 else if (alert_indicator_button_->enabled()) | 769 else if (alert_indicator_button_->enabled()) |
| 770 content::RecordAction(UserMetricsAction("CloseTab_MuteToggleAvailable")); | 770 content::RecordAction(UserMetricsAction("CloseTab_MuteToggleAvailable")); |
| 771 else if (data_.alert_state == TabAlertState::AUDIO_PLAYING) | 771 else if (data_.alert_state == TabAlertState::AUDIO_PLAYING) |
| 772 content::RecordAction(UserMetricsAction("CloseTab_AudioIndicator")); | 772 content::RecordAction(UserMetricsAction("CloseTab_AudioIndicator")); |
| 773 else | 773 else |
| 774 content::RecordAction(UserMetricsAction("CloseTab_RecordingIndicator")); | 774 content::RecordAction(UserMetricsAction("CloseTab_RecordingIndicator")); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 gfx::Rect bounds = favicon_bounds_; | 1486 gfx::Rect bounds = favicon_bounds_; |
| 1487 if (bounds.IsEmpty()) | 1487 if (bounds.IsEmpty()) |
| 1488 return; | 1488 return; |
| 1489 | 1489 |
| 1490 // Extends the area to the bottom when the crash animation is in progress. | 1490 // Extends the area to the bottom when the crash animation is in progress. |
| 1491 if (crash_icon_animation_->is_animating()) | 1491 if (crash_icon_animation_->is_animating()) |
| 1492 bounds.set_height(height() - bounds.y()); | 1492 bounds.set_height(height() - bounds.y()); |
| 1493 bounds.set_x(GetMirroredXForRect(bounds)); | 1493 bounds.set_x(GetMirroredXForRect(bounds)); |
| 1494 SchedulePaintInRect(bounds); | 1494 SchedulePaintInRect(bounds); |
| 1495 } | 1495 } |
| OLD | NEW |