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

Side by Side Diff: chrome/browser/ui/tab_contents/per_tab_prefs_tab_helper.h

Issue 8716004: Add per-tab "JavaScript enabled" preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and fixed fwd declaration Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_PER_TAB_PREFS_TAB_HELPER_H_
6 #define CHROME_BROWSER_UI_TAB_CONTENTS_PER_TAB_PREFS_TAB_HELPER_H_
7 #pragma once
8
9 #include "chrome/browser/prefs/pref_change_registrar.h"
10 #include "content/browser/tab_contents/tab_contents_observer.h"
11
12 class PrefService;
13 class TabContentsWrapper;
14 struct WebPreferences;
15
16 // Per-tab class to override user preferences.
17 class PerTabPrefsTabHelper : public TabContentsObserver {
18 public:
19 explicit PerTabPrefsTabHelper(TabContentsWrapper* tab_contents);
20 virtual ~PerTabPrefsTabHelper();
21
22 PrefService* prefs() { return prefs_.get(); }
23
24 void OverrideWebPreferences(WebPreferences* prefs);
25
26 private:
27 void RegisterPerTabUserPrefs(PrefService* prefs);
28
29 // TabContentsObserver overrides:
30 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
31
32 // Our owning TabContentsWrapper.
33 TabContentsWrapper* wrapper_;
34
35 scoped_ptr<PrefService> prefs_;
36 PrefChangeRegistrar pref_change_registrar_;
37
38 DISALLOW_COPY_AND_ASSIGN(PerTabPrefsTabHelper);
39 };
40
41 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_PER_TAB_PREFS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698