| 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/download/download_item_view_md.h" | 5 #include "chrome/browser/ui/views/download/download_item_view_md.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 model_(download_item), | 179 model_(download_item), |
| 180 save_button_(nullptr), | 180 save_button_(nullptr), |
| 181 discard_button_(nullptr), | 181 discard_button_(nullptr), |
| 182 dropdown_button_(new DropDownButton(this)), | 182 dropdown_button_(new DropDownButton(this)), |
| 183 dangerous_download_label_(nullptr), | 183 dangerous_download_label_(nullptr), |
| 184 dangerous_download_label_sized_(false), | 184 dangerous_download_label_sized_(false), |
| 185 disabled_while_opening_(false), | 185 disabled_while_opening_(false), |
| 186 creation_time_(base::Time::Now()), | 186 creation_time_(base::Time::Now()), |
| 187 time_download_warning_shown_(base::Time()), | 187 time_download_warning_shown_(base::Time()), |
| 188 weak_ptr_factory_(this) { | 188 weak_ptr_factory_(this) { |
| 189 SetHasInkDrop(true); | 189 SetHasInkDrop(ui::MaterialDesignController::IsModeMaterial()); |
| 190 DCHECK(download()); | 190 DCHECK(download()); |
| 191 DCHECK(ui::MaterialDesignController::IsModeMaterial()); | 191 DCHECK(ui::MaterialDesignController::IsModeMaterial()); |
| 192 download()->AddObserver(this); | 192 download()->AddObserver(this); |
| 193 set_context_menu_controller(this); | 193 set_context_menu_controller(this); |
| 194 | 194 |
| 195 dropdown_button_->SetBorder( | 195 dropdown_button_->SetBorder( |
| 196 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth))); | 196 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth))); |
| 197 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32)); | 197 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32)); |
| 198 AddChildView(dropdown_button_); | 198 AddChildView(dropdown_button_); |
| 199 | 199 |
| (...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 SchedulePaint(); | 1130 SchedulePaint(); |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 SkColor DownloadItemViewMd::GetTextColor() const { | 1133 SkColor DownloadItemViewMd::GetTextColor() const { |
| 1134 return GetTextColorForThemeProvider(GetThemeProvider()); | 1134 return GetTextColorForThemeProvider(GetThemeProvider()); |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 SkColor DownloadItemViewMd::GetDimmedTextColor() const { | 1137 SkColor DownloadItemViewMd::GetDimmedTextColor() const { |
| 1138 return SkColorSetA(GetTextColor(), 0xC7); | 1138 return SkColorSetA(GetTextColor(), 0xC7); |
| 1139 } | 1139 } |
| OLD | NEW |