diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-27 02:03:04 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-27 02:03:04 +0000 |
commit | 3e17c69c533d265be75410b657e8dfbb814563ec (patch) | |
tree | 2894f67e809ab1243bcf464db8471ed63f5334be /ui | |
parent | a05245a1153106f6f5938bf4257907261d0007e2 (diff) | |
download | chromium_src-3e17c69c533d265be75410b657e8dfbb814563ec.zip chromium_src-3e17c69c533d265be75410b657e8dfbb814563ec.tar.gz chromium_src-3e17c69c533d265be75410b657e8dfbb814563ec.tar.bz2 |
ui/base: Remove the dependency in Profile from ThemeProvider.
NOTE: This was a TODO for ben@.
BUG=80197
R=ben@chromium.org
TBR=rsesek@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9460039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/theme_provider.h | 5 | ||||
-rw-r--r-- | ui/views/widget/default_theme_provider.cc | 4 | ||||
-rw-r--r-- | ui/views/widget/default_theme_provider.h | 7 |
3 files changed, 3 insertions, 13 deletions
diff --git a/ui/base/theme_provider.h b/ui/base/theme_provider.h index a6a5dd9..1a5c9980 100644 --- a/ui/base/theme_provider.h +++ b/ui/base/theme_provider.h @@ -25,7 +25,6 @@ typedef struct _GdkColor GdkColor; typedef struct _GdkPixbuf GdkPixbuf; #endif // OS_* -class Profile; class RefCountedMemory; class SkBitmap; @@ -44,10 +43,6 @@ class UI_EXPORT ThemeProvider { public: virtual ~ThemeProvider(); - // TODO(beng): This dependency is horrible! - // Initialize the provider with the passed in profile. - virtual void Init(Profile* profile) = 0; - // Get the bitmap specified by |id|. An implementation of ThemeProvider should // have its own source of ids (e.g. an enum, or external resource bundle). virtual SkBitmap* GetBitmapNamed(int id) const = 0; diff --git a/ui/views/widget/default_theme_provider.cc b/ui/views/widget/default_theme_provider.cc index 8ad2cfb..5096870 100644 --- a/ui/views/widget/default_theme_provider.cc +++ b/ui/views/widget/default_theme_provider.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,8 +16,6 @@ DefaultThemeProvider::DefaultThemeProvider() {} DefaultThemeProvider::~DefaultThemeProvider() {} -void DefaultThemeProvider::Init(Profile* profile) {} - SkBitmap* DefaultThemeProvider::GetBitmapNamed(int id) const { return ResourceBundle::GetSharedInstance().GetBitmapNamed(id); } diff --git a/ui/views/widget/default_theme_provider.h b/ui/views/widget/default_theme_provider.h index d0705e2..cd975c3 100644 --- a/ui/views/widget/default_theme_provider.h +++ b/ui/views/widget/default_theme_provider.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,8 +13,6 @@ #include "ui/base/theme_provider.h" #include "ui/views/views_export.h" -class Profile; - namespace ui { class ResourceBundle; } @@ -27,8 +25,7 @@ class VIEWS_EXPORT DefaultThemeProvider : public ui::ThemeProvider { DefaultThemeProvider(); virtual ~DefaultThemeProvider(); - // Overridden from ui::ThemeProvider. - virtual void Init(Profile* profile) OVERRIDE; + // Overridden from ui::ThemeProvider: virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; virtual SkColor GetColor(int id) const OVERRIDE; virtual bool GetDisplayProperty(int id, int* result) const OVERRIDE; |