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

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

Issue 10026013: Update use of TimeDelta in chrome/browser/*, ui/views/*, and other places. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 parent()->SchedulePaint(); 319 parent()->SchedulePaint();
320 } 320 }
321 321
322 void DownloadItemView::OnDownloadOpened(DownloadItem* download) { 322 void DownloadItemView::OnDownloadOpened(DownloadItem* download) {
323 disabled_while_opening_ = true; 323 disabled_while_opening_ = true;
324 SetEnabled(false); 324 SetEnabled(false);
325 MessageLoop::current()->PostDelayedTask( 325 MessageLoop::current()->PostDelayedTask(
326 FROM_HERE, 326 FROM_HERE,
327 base::Bind(&DownloadItemView::Reenable, 327 base::Bind(&DownloadItemView::Reenable,
328 weak_ptr_factory_.GetWeakPtr()), 328 weak_ptr_factory_.GetWeakPtr()),
329 kDisabledOnOpenDuration); 329 base::TimeDelta::FromMilliseconds(kDisabledOnOpenDuration));
330 330
331 // Notify our parent. 331 // Notify our parent.
332 parent_->OpenedDownload(this); 332 parent_->OpenedDownload(this);
333 } 333 }
334 334
335 // View overrides 335 // View overrides
336 336
337 // In dangerous mode we have to layout our buttons. 337 // In dangerous mode we have to layout our buttons.
338 void DownloadItemView::Layout() { 338 void DownloadItemView::Layout() {
339 if (IsShowingWarningDialog()) { 339 if (IsShowingWarningDialog()) {
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 // Drop down button is glued to the left of the download shelf. 1177 // Drop down button is glued to the left of the download shelf.
1178 drop_down_x_left_ = 0; 1178 drop_down_x_left_ = 0;
1179 drop_down_x_right_ = normal_drop_down_image_set_.top->width(); 1179 drop_down_x_right_ = normal_drop_down_image_set_.top->width();
1180 } else { 1180 } else {
1181 // Drop down button is glued to the right of the download shelf. 1181 // Drop down button is glued to the right of the download shelf.
1182 drop_down_x_left_ = 1182 drop_down_x_left_ =
1183 size.width() - normal_drop_down_image_set_.top->width(); 1183 size.width() - normal_drop_down_image_set_.top->width();
1184 drop_down_x_right_ = size.width(); 1184 drop_down_x_right_ = size.width();
1185 } 1185 }
1186 } 1186 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/views/download/download_shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698