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

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

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 7 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.h" 5 #include "chrome/browser/ui/views/download/download_item_view.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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 normal_body_image_set_.top_left->height() + 210 normal_body_image_set_.top_left->height() +
211 normal_body_image_set_.bottom_left->height()); 211 normal_body_image_set_.bottom_left->height());
212 212
213 box_y_ = std::max(0, (2 * kProgressPadding + 213 box_y_ = std::max(0, (2 * kProgressPadding +
214 DownloadShelf::kProgressIndicatorSize - box_height_) / 214 DownloadShelf::kProgressIndicatorSize - box_height_) /
215 2); 215 2);
216 216
217 body_hover_animation_.reset(new gfx::SlideAnimation(this)); 217 body_hover_animation_.reset(new gfx::SlideAnimation(this));
218 drop_hover_animation_.reset(new gfx::SlideAnimation(this)); 218 drop_hover_animation_.reset(new gfx::SlideAnimation(this));
219 219
220 SetAccessibilityFocusable(true); 220 SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
221 221
222 OnDownloadUpdated(download()); 222 OnDownloadUpdated(download());
223 UpdateDropDownButtonPosition(); 223 UpdateDropDownButtonPosition();
224 } 224 }
225 225
226 DownloadItemView::~DownloadItemView() { 226 DownloadItemView::~DownloadItemView() {
227 StopDownloadProgress(); 227 StopDownloadProgress();
228 download()->RemoveObserver(this); 228 download()->RemoveObserver(this);
229 229
230 // ExperienceSampling: If the user took no action to remove the warning 230 // ExperienceSampling: If the user took no action to remove the warning
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 animation->Reset((to == HOT) ? 1.0 : 0.0); 1363 animation->Reset((to == HOT) ? 1.0 : 0.0);
1364 } 1364 }
1365 } 1365 }
1366 1366
1367 void DownloadItemView::ProgressTimerFired() { 1367 void DownloadItemView::ProgressTimerFired() {
1368 // Only repaint for the indeterminate size case. Otherwise, we'll repaint only 1368 // Only repaint for the indeterminate size case. Otherwise, we'll repaint only
1369 // when there's an update notified via OnDownloadUpdated(). 1369 // when there's an update notified via OnDownloadUpdated().
1370 if (model_.PercentComplete() < 0) 1370 if (model_.PercentComplete() < 0)
1371 SchedulePaint(); 1371 SchedulePaint();
1372 } 1372 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/desktop_media_picker_views.cc ('k') | chrome/browser/ui/views/download/download_item_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698