Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chrome/browser/ui/views/download/download_item_view_md.cc

Issue 2070143003: Add MD ink drop ripple to app list button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b612539_shelf_button_ripple
Patch Set: Changed SetHasInkDrop to SetInkDropMode Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 if (ui::MaterialDesignController::IsModeMaterial())
sky 2016/06/30 00:35:34 This class is only created when in md, so you can
mohsen 2016/06/30 08:54:07 Done.
191 SetInkDropMode(INK_DROP_WITH_GESTURE_HANDLING);
191 DCHECK(download()); 192 DCHECK(download());
192 DCHECK(ui::MaterialDesignController::IsModeMaterial()); 193 DCHECK(ui::MaterialDesignController::IsModeMaterial());
193 download()->AddObserver(this); 194 download()->AddObserver(this);
194 set_context_menu_controller(this); 195 set_context_menu_controller(this);
195 196
196 dropdown_button_->SetBorder( 197 dropdown_button_->SetBorder(
197 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth))); 198 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth)));
198 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32)); 199 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32));
199 AddChildView(dropdown_button_); 200 AddChildView(dropdown_button_);
200 201
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 SchedulePaint(); 1139 SchedulePaint();
1139 } 1140 }
1140 1141
1141 SkColor DownloadItemViewMd::GetTextColor() const { 1142 SkColor DownloadItemViewMd::GetTextColor() const {
1142 return GetTextColorForThemeProvider(GetThemeProvider()); 1143 return GetTextColorForThemeProvider(GetThemeProvider());
1143 } 1144 }
1144 1145
1145 SkColor DownloadItemViewMd::GetDimmedTextColor() const { 1146 SkColor DownloadItemViewMd::GetDimmedTextColor() const {
1146 return SkColorSetA(GetTextColor(), 0xC7); 1147 return SkColorSetA(GetTextColor(), 0xC7);
1147 } 1148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698