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

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

Issue 8068013: Add interface to CancelableRequest that allows use of base::Callback<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dcheck Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 base::Time::Now() - creation_time_); 921 base::Time::Now() - creation_time_);
922 download_->OpenDownload(); 922 download_->OpenDownload();
923 UpdateAccessibleName(); 923 UpdateAccessibleName();
924 } 924 }
925 925
926 void DownloadItemView::LoadIcon() { 926 void DownloadItemView::LoadIcon() {
927 IconManager* im = g_browser_process->icon_manager(); 927 IconManager* im = g_browser_process->icon_manager();
928 last_download_item_path_ = download_->GetUserVerifiedFilePath(); 928 last_download_item_path_ = download_->GetUserVerifiedFilePath();
929 im->LoadIcon(last_download_item_path_, 929 im->LoadIcon(last_download_item_path_,
930 IconLoader::SMALL, &icon_consumer_, 930 IconLoader::SMALL, &icon_consumer_,
931 NewCallback(this, &DownloadItemView::OnExtractIconComplete)); 931 base::Bind(&DownloadItemView::OnExtractIconComplete,
932 base::Unretained(this)));
932 } 933 }
933 934
934 void DownloadItemView::LoadIconIfItemPathChanged() { 935 void DownloadItemView::LoadIconIfItemPathChanged() {
935 FilePath current_download_path = download_->GetUserVerifiedFilePath(); 936 FilePath current_download_path = download_->GetUserVerifiedFilePath();
936 if (last_download_item_path_ == current_download_path) 937 if (last_download_item_path_ == current_download_path)
937 return; 938 return;
938 939
939 LoadIcon(); 940 LoadIcon();
940 } 941 }
941 942
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 // If the name has changed, notify assistive technology that the name 1116 // If the name has changed, notify assistive technology that the name
1116 // has changed so they can announce it immediately. 1117 // has changed so they can announce it immediately.
1117 if (new_name != accessible_name_) { 1118 if (new_name != accessible_name_) {
1118 accessible_name_ = new_name; 1119 accessible_name_ = new_name;
1119 if (GetWidget()) { 1120 if (GetWidget()) {
1120 GetWidget()->NotifyAccessibilityEvent( 1121 GetWidget()->NotifyAccessibilityEvent(
1121 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true); 1122 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true);
1122 } 1123 }
1123 } 1124 }
1124 } 1125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698