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

Side by Side Diff: chrome/browser/browser_theme_provider.cc

Issue 630002: Allow the Mac theme provider to give default colors/tints if requested. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: merge Created 10 years, 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser_theme_provider.h" 5 #include "chrome/browser/browser_theme_provider.h"
6 6
7 #include "app/gfx/codec/png_codec.h" 7 #include "app/gfx/codec/png_codec.h"
8 #include "app/gfx/skbitmap_operations.h" 8 #include "app/gfx/skbitmap_operations.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 534 }
535 } 535 }
536 } 536 }
537 537
538 void BrowserThemeProvider::NotifyThemeChanged() { 538 void BrowserThemeProvider::NotifyThemeChanged() {
539 // Redraw! 539 // Redraw!
540 NotificationService* service = NotificationService::current(); 540 NotificationService* service = NotificationService::current();
541 service->Notify(NotificationType::BROWSER_THEME_CHANGED, 541 service->Notify(NotificationType::BROWSER_THEME_CHANGED,
542 Source<BrowserThemeProvider>(this), 542 Source<BrowserThemeProvider>(this),
543 NotificationService::NoDetails()); 543 NotificationService::NoDetails());
544 #if defined(OS_MACOSX)
545 NotifyPlatformThemeChanged();
546 #endif // OS_MACOSX
544 } 547 }
545 548
546 #if defined(OS_WIN) 549 #if defined(OS_WIN)
547 void BrowserThemeProvider::FreePlatformCaches() { 550 void BrowserThemeProvider::FreePlatformCaches() {
548 // Views (Skia) has no platform image cache to clear. 551 // Views (Skia) has no platform image cache to clear.
549 } 552 }
550 #endif 553 #endif
551 554
552 void BrowserThemeProvider::SavePackName(const FilePath& pack_path) { 555 void BrowserThemeProvider::SavePackName(const FilePath& pack_path) {
553 profile_->GetPrefs()->SetFilePath( 556 profile_->GetPrefs()->SetFilePath(
(...skipping 26 matching lines...) Expand all
580 void BrowserThemeProvider::OnInfobarDisplayed() { 583 void BrowserThemeProvider::OnInfobarDisplayed() {
581 number_of_infobars_++; 584 number_of_infobars_++;
582 } 585 }
583 586
584 void BrowserThemeProvider::OnInfobarDestroyed() { 587 void BrowserThemeProvider::OnInfobarDestroyed() {
585 number_of_infobars_--; 588 number_of_infobars_--;
586 589
587 if (number_of_infobars_ == 0) 590 if (number_of_infobars_ == 0)
588 RemoveUnusedThemes(); 591 RemoveUnusedThemes();
589 } 592 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698