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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 model_(download_item), | 180 model_(download_item), |
181 save_button_(nullptr), | 181 save_button_(nullptr), |
182 discard_button_(nullptr), | 182 discard_button_(nullptr), |
183 dropdown_button_(new DropDownButton(this)), | 183 dropdown_button_(new DropDownButton(this)), |
184 dangerous_download_label_(nullptr), | 184 dangerous_download_label_(nullptr), |
185 dangerous_download_label_sized_(false), | 185 dangerous_download_label_sized_(false), |
186 disabled_while_opening_(false), | 186 disabled_while_opening_(false), |
187 creation_time_(base::Time::Now()), | 187 creation_time_(base::Time::Now()), |
188 time_download_warning_shown_(base::Time()), | 188 time_download_warning_shown_(base::Time()), |
189 weak_ptr_factory_(this) { | 189 weak_ptr_factory_(this) { |
190 SetHasInkDrop(ui::MaterialDesignController::IsModeMaterial()); | 190 SetInkDropMode(InkDropMode::ON); |
191 DCHECK(download()); | 191 DCHECK(download()); |
192 DCHECK(ui::MaterialDesignController::IsModeMaterial()); | 192 DCHECK(ui::MaterialDesignController::IsModeMaterial()); |
193 download()->AddObserver(this); | 193 download()->AddObserver(this); |
194 set_context_menu_controller(this); | 194 set_context_menu_controller(this); |
195 | 195 |
196 dropdown_button_->SetBorder( | 196 dropdown_button_->SetBorder( |
197 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth))); | 197 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth))); |
198 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32)); | 198 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32)); |
199 AddChildView(dropdown_button_); | 199 AddChildView(dropdown_button_); |
200 | 200 |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 SchedulePaint(); | 1138 SchedulePaint(); |
1139 } | 1139 } |
1140 | 1140 |
1141 SkColor DownloadItemViewMd::GetTextColor() const { | 1141 SkColor DownloadItemViewMd::GetTextColor() const { |
1142 return GetTextColorForThemeProvider(GetThemeProvider()); | 1142 return GetTextColorForThemeProvider(GetThemeProvider()); |
1143 } | 1143 } |
1144 | 1144 |
1145 SkColor DownloadItemViewMd::GetDimmedTextColor() const { | 1145 SkColor DownloadItemViewMd::GetDimmedTextColor() const { |
1146 return SkColorSetA(GetTextColor(), 0xC7); | 1146 return SkColorSetA(GetTextColor(), 0xC7); |
1147 } | 1147 } |
OLD | NEW |