diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-22 18:05:22 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-22 18:05:22 +0000 |
commit | 18280378d78cc83d8e83de21f28411cb4fa777bc (patch) | |
tree | a820592ddb8899a850e75061fc2e4e533e8b149e /chrome/browser/debugger | |
parent | 33a85f181bf099afe9067d50277ea0e85e35f302 (diff) | |
download | chromium_src-18280378d78cc83d8e83de21f28411cb4fa777bc.zip chromium_src-18280378d78cc83d8e83de21f28411cb4fa777bc.tar.gz chromium_src-18280378d78cc83d8e83de21f28411cb4fa777bc.tar.bz2 |
Profile shouldn't own BrowserThemeProviders; A ThemeService should and should give back a BTP when presented with a Profile.
This removes all Profile methods that deal with themes. A profile is now just the key that ThemeService maps to a BrowserThemeProvider. Any user of a BrowserThemeProvider asks ThemeService::GetForProfile() instead of the now deleted Profile::GetThemeProvider() method.
Why do this? Because this will drastically reduce coupling. Right now, the Profile knows about pretty much every major object in chrome/browser/. This should allow easier compile time removal of certain systems.
BUG=profile effort
TEST=existing tests
Review URL: http://codereview.chromium.org/6714003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r-- | chrome/browser/debugger/devtools_window.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index 5e4b324..0cabc18 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -18,6 +18,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/themes/browser_theme_provider.h" +#include "chrome/browser/themes/theme_service.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/bindings_policy.h" @@ -377,7 +378,7 @@ std::string SkColorToRGBAString(SkColor color) { } GURL DevToolsWindow::GetDevToolsUrl() { - BrowserThemeProvider* tp = profile_->GetThemeProvider(); + BrowserThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_); CHECK(tp); SkColor color_toolbar = @@ -395,7 +396,7 @@ GURL DevToolsWindow::GetDevToolsUrl() { } void DevToolsWindow::UpdateTheme() { - BrowserThemeProvider* tp = profile_->GetThemeProvider(); + BrowserThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_); CHECK(tp); SkColor color_toolbar = |