OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/download_shelf_view.h" | 5 #include "chrome/browser/views/download_shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 void DownloadShelfView::UpdateButtonColors() { | 295 void DownloadShelfView::UpdateButtonColors() { |
296 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 296 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
297 if (GetThemeProvider()) { | 297 if (GetThemeProvider()) { |
298 close_button_->SetBackground( | 298 close_button_->SetBackground( |
299 GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), | 299 GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), |
300 rb.GetBitmapNamed(IDR_CLOSE_BAR), | 300 rb.GetBitmapNamed(IDR_CLOSE_BAR), |
301 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); | 301 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 void DownloadShelfView::ThemeChanged() { | 305 void DownloadShelfView::OnThemeChanged() { |
306 UpdateButtonColors(); | 306 UpdateButtonColors(); |
307 } | 307 } |
308 | 308 |
309 void DownloadShelfView::LinkActivated(views::Link* source, int event_flags) { | 309 void DownloadShelfView::LinkActivated(views::Link* source, int event_flags) { |
310 browser_->ShowDownloadsTab(); | 310 browser_->ShowDownloadsTab(); |
311 } | 311 } |
312 | 312 |
313 void DownloadShelfView::ButtonPressed( | 313 void DownloadShelfView::ButtonPressed( |
314 views::Button* button, const views::Event& event) { | 314 views::Button* button, const views::Event& event) { |
315 Close(); | 315 Close(); |
(...skipping 24 matching lines...) Expand all Loading... |
340 bool is_transfer_done = download->state() == DownloadItem::COMPLETE || | 340 bool is_transfer_done = download->state() == DownloadItem::COMPLETE || |
341 download->state() == DownloadItem::CANCELLED; | 341 download->state() == DownloadItem::CANCELLED; |
342 if (is_transfer_done && | 342 if (is_transfer_done && |
343 download->safety_state() != DownloadItem::DANGEROUS) { | 343 download->safety_state() != DownloadItem::DANGEROUS) { |
344 RemoveDownloadView(download_views_[i]); | 344 RemoveDownloadView(download_views_[i]); |
345 } else { | 345 } else { |
346 ++i; | 346 ++i; |
347 } | 347 } |
348 } | 348 } |
349 } | 349 } |
OLD | NEW |