summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-09 04:10:45 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-09 04:10:45 +0000
commit99dbb4b5b1ec5edeb69551febe99eed097c3f995 (patch)
treece471ec421fdcb7adc0df5fca5e69a0268bc74f9
parent65a8a612270f60c09d92c9e02b51b05330c9f3d0 (diff)
downloadchromium_src-99dbb4b5b1ec5edeb69551febe99eed097c3f995.zip
chromium_src-99dbb4b5b1ec5edeb69551febe99eed097c3f995.tar.gz
chromium_src-99dbb4b5b1ec5edeb69551febe99eed097c3f995.tar.bz2
Some unnecessary painting and initing was being done.
TBR=beng Review URL: http://codereview.chromium.org/113182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15714 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_theme_provider.cc17
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc4
2 files changed, 8 insertions, 13 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index c04c508..dd477d0 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -456,20 +456,19 @@ void BrowserThemeProvider::NotifyThemeChanged() {
void BrowserThemeProvider::LoadThemePrefs() {
PrefService* prefs = profile_->GetPrefs();
- // Our prefs already have the extension path baked in, so we don't need
- // to provide it.
- SetImageData(prefs->GetMutableDictionary(prefs::kCurrentThemeImages),
- FilePath());
- SetColorData(prefs->GetMutableDictionary(prefs::kCurrentThemeColors));
- SetTintData(prefs->GetMutableDictionary(prefs::kCurrentThemeTints));
- GenerateFrameColors();
- GenerateFrameImages();
-
// TODO(glen): Figure out if any custom prefs were loaded, and if so
// UMA-log the fact that a theme was loaded.
if (prefs->HasPrefPath(prefs::kCurrentThemeImages) ||
prefs->HasPrefPath(prefs::kCurrentThemeColors) ||
prefs->HasPrefPath(prefs::kCurrentThemeTints)) {
+ // Our prefs already have the extension path baked in, so we don't need
+ // to provide it.
+ SetImageData(prefs->GetMutableDictionary(prefs::kCurrentThemeImages),
+ FilePath());
+ SetColorData(prefs->GetMutableDictionary(prefs::kCurrentThemeColors));
+ SetTintData(prefs->GetMutableDictionary(prefs::kCurrentThemeTints));
+ GenerateFrameColors();
+ GenerateFrameImages();
UserMetrics::RecordAction(L"Themes_loaded", profile_);
}
}
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index 317e307..5a2fb24 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -668,9 +668,6 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) {
SkBitmap* toolbar_left =
tp->GetBitmapNamed(IDR_CONTENT_TOP_LEFT_CORNER);
- canvas->DrawBitmapInt(*toolbar_left,
- toolbar_bounds.x() - toolbar_left->width(),
- toolbar_bounds.y());
// Gross hack: We split the toolbar images into two pieces, since sometimes
// (popup mode) the toolbar isn't tall enough to show the whole image. The
@@ -758,7 +755,6 @@ void OpaqueBrowserFrameView::PaintRestoredClientEdge(ChromeCanvas* canvas) {
top_right->width(), height, false);
}
-
int client_area_bottom =
std::max(client_area_top, height() - NonClientBorderThickness());
int client_area_height = client_area_bottom - client_area_top;