Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 8568019: Introduce per-tab preferences service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index f84158a08173fe6ef99c42117eb86eb5287d3315..dc35d2e92f7eb2a863521101c5f1b3bd9cdeca1d 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -13,6 +13,8 @@
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/browser/browser_context.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/debugger/devtools_manager.h"
@@ -202,7 +204,10 @@ TabContents::TabContents(content::BrowserContext* browser_context,
static_cast<int>(WebKit::WebView::maxTextSizeMultiplier * 100)),
temporary_zoom_settings_(false),
content_restrictions_(0),
- view_type_(content::VIEW_TYPE_TAB_CONTENTS) {
+ view_type_(content::VIEW_TYPE_TAB_CONTENTS),
+ per_tab_prefs_(
+ Profile::FromBrowserContext(browser_context)->
+ GetPrefs()->CreatePrefServiceWithPerTabPrefStore()) {
render_manager_.Init(browser_context, site_instance, routing_id);
@@ -1836,6 +1841,8 @@ WebPreferences TabContents::GetWebkitPrefs() {
web_prefs.force_compositing_mode = true;
#endif
+ // TODO: Apply overrides from per_tab_prefs_ here.
+
return web_prefs;
}
« chrome/browser/prefs/pref_value_store.h ('K') | « content/browser/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698