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

Side by Side Diff: chrome/browser/download/download_status_updater.cc

Issue 23922007: Merge the LinuxUI interface from its own .so into libviews.so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/download/download_status_updater.h" 5 #include "chrome/browser/download/download_status_updater.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 11
12 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 12 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
13 #include "ui/linux_ui/linux_ui.h" 13 #include "ui/views/linux_ui/linux_ui.h"
14 #endif 14 #endif
15 15
16 namespace { 16 namespace {
17 17
18 // DownloadStatusUpdater::UpdateAppIconDownloadProgress() expects to only be 18 // DownloadStatusUpdater::UpdateAppIconDownloadProgress() expects to only be
19 // called once when a DownloadItem completes, then not again (except perhaps 19 // called once when a DownloadItem completes, then not again (except perhaps
20 // until it is resumed). The existence of WasInProgressData is effectively a 20 // until it is resumed). The existence of WasInProgressData is effectively a
21 // boolean that indicates whether that final UpdateAppIconDownloadProgress() 21 // boolean that indicates whether that final UpdateAppIconDownloadProgress()
22 // call has been made for a given DownloadItem. It is expected that there will 22 // call has been made for a given DownloadItem. It is expected that there will
23 // be many more non-in-progress downloads than in-progress downloads, so 23 // be many more non-in-progress downloads than in-progress downloads, so
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return; 130 return;
131 WasInProgressData::Clear(item); 131 WasInProgressData::Clear(item);
132 } 132 }
133 UpdateAppIconDownloadProgress(item); 133 UpdateAppIconDownloadProgress(item);
134 } 134 }
135 135
136 #if defined(USE_AURA) || defined(OS_ANDROID) 136 #if defined(USE_AURA) || defined(OS_ANDROID)
137 void DownloadStatusUpdater::UpdateAppIconDownloadProgress( 137 void DownloadStatusUpdater::UpdateAppIconDownloadProgress(
138 content::DownloadItem* download) { 138 content::DownloadItem* download) {
139 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 139 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
140 const ui::LinuxUI* linux_ui = ui::LinuxUI::instance(); 140 const views::LinuxUI* linux_ui = views::LinuxUI::instance();
141 if (linux_ui) { 141 if (linux_ui) {
142 float progress = 0; 142 float progress = 0;
143 int download_count = 0; 143 int download_count = 0;
144 GetProgress(&progress, &download_count); 144 GetProgress(&progress, &download_count);
145 linux_ui->SetDownloadCount(download_count); 145 linux_ui->SetDownloadCount(download_count);
146 linux_ui->SetProgressFraction(progress); 146 linux_ui->SetProgressFraction(progress);
147 } 147 }
148 #endif 148 #endif
149 // TODO(avi): Implement for Android? 149 // TODO(avi): Implement for Android?
150 } 150 }
151 #endif 151 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698