diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 02:07:02 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 02:07:02 +0000 |
commit | d626039c56c514d99c464f37e4621371ef4846da (patch) | |
tree | bcad41f4ff83c85838a835c5d645d556deaed995 /chrome/common/platform_util_linux.cc | |
parent | 4e2c7cb18c64b8ecf5823206493a3701dccf8d56 (diff) | |
download | chromium_src-d626039c56c514d99c464f37e4621371ef4846da.zip chromium_src-d626039c56c514d99c464f37e4621371ef4846da.tar.gz chromium_src-d626039c56c514d99c464f37e4621371ef4846da.tar.bz2 |
Make the default RendererPreferences smarter.
Change the default RenderViewHostDelegate::GetRendererPrefs to a singleton because initialization may not always be cheap (we assume copying is, however).
BUG=29043
TEST=if you focus a link in an extension popup, you can actually see the focus ring (the focus ring had been set to 0x000000 color)
Review URL: http://codereview.chromium.org/458013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/platform_util_linux.cc')
-rw-r--r-- | chrome/common/platform_util_linux.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/common/platform_util_linux.cc b/chrome/common/platform_util_linux.cc index 9f0e346..021d6a1 100644 --- a/chrome/common/platform_util_linux.cc +++ b/chrome/common/platform_util_linux.cc @@ -8,6 +8,7 @@ #include "base/file_util.h" #include "base/process_util.h" +#include "base/singleton.h" #include "base/string_util.h" #include "chrome/common/gtk_util.h" #include "chrome/common/process_watcher.h" @@ -87,4 +88,14 @@ void SimpleErrorBox(gfx::NativeWindow parent, gtk_widget_show_all(dialog); } +RendererPreferences GetInitedRendererPreferences() { + RendererPreferences* prefs = Singleton<RendererPreferences>::get(); + static bool inited = false; + if (!inited) { + gtk_util::InitRendererPrefsFromGtkSettings(prefs); + inited = true; + } + return *prefs; +} + } // namespace platform_util |