Chromium Code Reviews| 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/location_bar/content_setting_image_view.h" | 5 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/themes/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
| 9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" | 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
| 11 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" | 11 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" |
| 12 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 12 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 13 #include "grit/theme_resources.h" | 13 #include "grit/theme_resources.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 15 #include "ui/base/material_design/material_design_controller.h" | 15 #include "ui/base/material_design/material_design_controller.h" |
| 16 #include "ui/base/theme_provider.h" | 16 #include "ui/base/theme_provider.h" |
| 17 #include "ui/gfx/color_palette.h" | 17 #include "ui/gfx/color_palette.h" |
| 18 #include "ui/gfx/color_utils.h" | 18 #include "ui/gfx/color_utils.h" |
| 19 #include "ui/views/animation/button_ink_drop_delegate.h" | 19 #include "ui/views/animation/button_ink_drop_delegate.h" |
| 20 #include "ui/views/animation/ink_drop_hover.h" | 20 #include "ui/views/animation/ink_drop_highlight.h" |
|
bruthig
2016/06/03 02:50:45
Is this needed?
Evan Stade
2016/06/03 03:01:41
Done.
| |
| 21 #include "ui/views/controls/image_view.h" | 21 #include "ui/views/controls/image_view.h" |
| 22 #include "ui/views/controls/label.h" | 22 #include "ui/views/controls/label.h" |
| 23 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 // Time spent with animation fully open. | 26 // Time spent with animation fully open. |
| 27 const int kStayOpenTimeMS = 3200; | 27 const int kStayOpenTimeMS = 3200; |
| 28 } | 28 } |
| 29 | 29 |
| 30 | 30 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 bool visible) { | 279 bool visible) { |
| 280 // |widget| is a bubble that has just got shown / hidden. | 280 // |widget| is a bubble that has just got shown / hidden. |
| 281 if (!visible && !label()->visible()) | 281 if (!visible && !label()->visible()) |
| 282 ink_drop_delegate_->OnAction(views::InkDropState::DEACTIVATED); | 282 ink_drop_delegate_->OnAction(views::InkDropState::DEACTIVATED); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void ContentSettingImageView::UpdateImage() { | 285 void ContentSettingImageView::UpdateImage() { |
| 286 SetImage(content_setting_image_model_->GetIcon(GetTextColor()).AsImageSkia()); | 286 SetImage(content_setting_image_model_->GetIcon(GetTextColor()).AsImageSkia()); |
| 287 image()->SetTooltipText(content_setting_image_model_->get_tooltip()); | 287 image()->SetTooltipText(content_setting_image_model_->get_tooltip()); |
| 288 } | 288 } |
| OLD | NEW |