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

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

Issue 5741001: Even more virtual method deinlining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (windows) Created 10 years 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/themes/browser_theme_provider.h" 5 #include "chrome/browser/themes/browser_theme_provider.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/string_split.h" 8 #include "base/string_split.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 for (size_t i = 0; i < remove_list.size(); ++i) 319 for (size_t i = 0; i < remove_list.size(); ++i)
320 service->UninstallExtension(remove_list[i], false); 320 service->UninstallExtension(remove_list[i], false);
321 } 321 }
322 322
323 void BrowserThemeProvider::UseDefaultTheme() { 323 void BrowserThemeProvider::UseDefaultTheme() {
324 ClearAllThemeData(); 324 ClearAllThemeData();
325 NotifyThemeChanged(NULL); 325 NotifyThemeChanged(NULL);
326 UserMetrics::RecordAction(UserMetricsAction("Themes_Reset"), profile_); 326 UserMetrics::RecordAction(UserMetricsAction("Themes_Reset"), profile_);
327 } 327 }
328 328
329 void BrowserThemeProvider::SetNativeTheme() {
330 UseDefaultTheme();
331 }
332
329 bool BrowserThemeProvider::UsingDefaultTheme() { 333 bool BrowserThemeProvider::UsingDefaultTheme() {
330 return GetThemeID() == BrowserThemeProvider::kDefaultThemeID; 334 return GetThemeID() == BrowserThemeProvider::kDefaultThemeID;
331 } 335 }
332 336
333 std::string BrowserThemeProvider::GetThemeID() const { 337 std::string BrowserThemeProvider::GetThemeID() const {
334 return profile_->GetPrefs()->GetString(prefs::kCurrentThemeID); 338 return profile_->GetPrefs()->GetString(prefs::kCurrentThemeID);
335 } 339 }
336 340
337 // static 341 // static
338 std::string BrowserThemeProvider::AlignmentToString(int alignment) { 342 std::string BrowserThemeProvider::AlignmentToString(int alignment) {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 void BrowserThemeProvider::OnInfobarDisplayed() { 626 void BrowserThemeProvider::OnInfobarDisplayed() {
623 number_of_infobars_++; 627 number_of_infobars_++;
624 } 628 }
625 629
626 void BrowserThemeProvider::OnInfobarDestroyed() { 630 void BrowserThemeProvider::OnInfobarDestroyed() {
627 number_of_infobars_--; 631 number_of_infobars_--;
628 632
629 if (number_of_infobars_ == 0) 633 if (number_of_infobars_ == 0)
630 RemoveUnusedThemes(); 634 RemoveUnusedThemes();
631 } 635 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_provider.h ('k') | chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698