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

Side by Side Diff: chrome/browser/ui/gtk/options/content_settings_window_gtk.h

Issue 6670011: Options: Remove the GTK and Views native options code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 9 months 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_GTK_OPTIONS_CONTENT_SETTINGS_WINDOW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_OPTIONS_CONTENT_SETTINGS_WINDOW_GTK_H_
7 #pragma once
8
9 #include <gtk/gtk.h>
10
11 #include "base/scoped_ptr.h"
12 #include "chrome/browser/prefs/pref_member.h"
13 #include "chrome/browser/ui/gtk/options/content_filter_page_gtk.h"
14 #include "chrome/browser/ui/gtk/options/cookie_filter_page_gtk.h"
15 #include "chrome/common/content_settings_types.h"
16 #include "ui/base/gtk/gtk_signal.h"
17
18 // A window that presents options to the user for blocking various kinds of
19 // content in webpages (cookies, javascript, images, popups).
20 class ContentSettingsWindowGtk {
21 public:
22 // Shows the current content settings page, opening a new one if it doesn't
23 // exist.
24 static void Show(GtkWindow* parent, ContentSettingsType page,
25 Profile* profile);
26 static void RegisterUserPrefs(PrefService* prefs);
27
28 explicit ContentSettingsWindowGtk(GtkWindow* parent, Profile* profile);
29 virtual ~ContentSettingsWindowGtk();
30
31 private:
32 // Shows the Tab corresponding to the specified Content Settings page.
33 void ShowContentSettingsTab(ContentSettingsType page);
34
35 CHROMEGTK_CALLBACK_2(ContentSettingsWindowGtk, void, OnSwitchPage,
36 GtkNotebookPage*, guint);
37 CHROMEGTK_CALLBACK_0(ContentSettingsWindowGtk, void, OnWindowDestroy);
38 CHROMEG_CALLBACK_0(ContentSettingsWindowGtk, void, OnListSelectionChanged,
39 GtkTreeSelection*);
40
41 // The options dialog.
42 GtkWidget* dialog_;
43
44 // The container of the option pages.
45 GtkWidget* notebook_;
46 GtkWidget* list_;
47
48 // The Profile associated with these options.
49 Profile* profile_;
50
51 // The last page the user was on when they opened the ContentSettings window.
52 IntegerPrefMember last_selected_page_;
53
54 // The individual page implementations. Note that we have a specialized one
55 // for cookies (which have more complex rules) and use the same basic page
56 // layout for each other type.
57 CookieFilterPageGtk cookie_page_;
58 ContentFilterPageGtk image_page_;
59 ContentFilterPageGtk javascript_page_;
60 ContentFilterPageGtk plugin_page_;
61 ContentFilterPageGtk popup_page_;
62 ContentFilterPageGtk geolocation_page_;
63 ContentFilterPageGtk notifications_page_;
64
65 DISALLOW_COPY_AND_ASSIGN(ContentSettingsWindowGtk);
66 };
67
68 #endif // CHROME_BROWSER_UI_GTK_OPTIONS_CONTENT_SETTINGS_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/options/content_page_gtk.cc ('k') | chrome/browser/ui/gtk/options/content_settings_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698