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

Side by Side Diff: chrome/browser/views/download_shelf_view.cc

Issue 2878055: Make theme change notifications auto-propagate through the view hierarchy, in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/views/download_shelf_view.h ('k') | chrome/browser/views/extensions/extension_shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698