summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 02:07:02 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 02:07:02 +0000
commitd626039c56c514d99c464f37e4621371ef4846da (patch)
treebcad41f4ff83c85838a835c5d645d556deaed995 /chrome/browser/extensions
parent4e2c7cb18c64b8ecf5823206493a3701dccf8d56 (diff)
downloadchromium_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/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_host.cc5
-rw-r--r--chrome/browser/extensions/extension_host.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 136feb2..1aa6ac8 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -32,6 +32,7 @@
#include "chrome/common/bindings_policy.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/platform_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/view_types.h"
@@ -414,6 +415,10 @@ void ExtensionHost::Close(RenderViewHost* render_view_host) {
}
}
+RendererPreferences ExtensionHost::GetRendererPrefs() const {
+ return platform_util::GetInitedRendererPreferences();
+}
+
WebPreferences ExtensionHost::GetWebkitPrefs() {
PrefService* prefs = render_view_host()->process()->profile()->GetPrefs();
const bool kIsDomUI = true;
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index e3ae680..35fc89e 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -119,6 +119,7 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
IPC::Message* reply_msg,
bool* did_suppress_message);
virtual void Close(RenderViewHost* render_view_host);
+ virtual RendererPreferences GetRendererPrefs() const;
// RenderViewHostDelegate::View
virtual void CreateNewWindow(int route_id);