diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/platform_util.h | 3 | ||||
-rw-r--r-- | chrome/common/platform_util_linux.cc | 11 | ||||
-rw-r--r-- | chrome/common/platform_util_mac.mm | 4 | ||||
-rw-r--r-- | chrome/common/platform_util_win.cc | 4 |
4 files changed, 22 insertions, 0 deletions
diff --git a/chrome/common/platform_util.h b/chrome/common/platform_util.h index 0a042f2..fbe1ba6 100644 --- a/chrome/common/platform_util.h +++ b/chrome/common/platform_util.h @@ -7,6 +7,7 @@ #include "app/gfx/native_widget_types.h" #include "base/string16.h" +#include "chrome/common/renderer_preferences.h" class FilePath; class GURL; @@ -44,6 +45,8 @@ void SimpleErrorBox(gfx::NativeWindow parent, const string16& title, const string16& message); +RendererPreferences GetInitedRendererPreferences(); + } #endif // CHROME_COMMON_PLATFORM_UTIL_H_ 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 diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm index 2c9883a..db474a2 100644 --- a/chrome/common/platform_util_mac.mm +++ b/chrome/common/platform_util_mac.mm @@ -84,4 +84,8 @@ void SimpleErrorBox(gfx::NativeWindow parent, [alert runModal]; } +RendererPreferences GetInitedRendererPreferences() { + return RendererPreferences(); +} + } // namespace platform_util diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc index 1b1b666..6ddd47c 100644 --- a/chrome/common/platform_util_win.cc +++ b/chrome/common/platform_util_win.cc @@ -157,4 +157,8 @@ void SimpleErrorBox(gfx::NativeWindow parent, win_util::MessageBox(parent, message, title, MB_OK | MB_SETFOREGROUND); } +RendererPreferences GetInitedRendererPreferences() { + return RendererPreferences(); +} + } // namespace platform_util |