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

Side by Side Diff: chrome/browser/ui/gtk/website_settings_popup_gtk.h

Issue 9732007: Add GTK Website Settings UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 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) 2012 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_WEBSITE_SETTINGS_POPUP_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
7 #pragma once
8
9 #include "chrome/browser/ui/website_settings_ui.h"
10
11 #include <gtk/gtk.h>
12
13 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
14
15 class BubbleGtk;
16 class Profile;
17 class TabContentsWrapper;
18 class ThemeServiceGtk;
19
20 // GTK implementation of the website settings UI. The website settings UI is
21 // displayed in a popup that is positioned relative the an anchor element.
22 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
23 public BubbleDelegateGtk {
24 public:
25 WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
26 Profile* profile,
27 TabContentsWrapper* wrapper);
28 virtual ~WebsiteSettingsPopupGtk();
29
30 // WebsiteSettingsUI implementations.
31 virtual void SetDelegate(WebsiteSettingsUIDelegate* delegate) OVERRIDE;
32 virtual void SetSiteInfo(const std::string site_info) OVERRIDE;
33 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE;
34 virtual void SetPermissionInfo(
35 const PermissionInfoList& permission_info_list) OVERRIDE;
36
37 // BubbleDelegateGtk implementation.
38 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
39
40 private:
41 // Layouts the different sections retrieved from the model.
42 void InitContents();
43
44 // Removes all children of |container|.
45 void ClearContainer(GtkWidget* container);
46
47 // Creates a popup section and returns a virtual box that contains the section
48 // content.
49 GtkWidget* CreateSection(std::string section_title,
50 GtkWidget* section_content);
51
52 // Callbacks for the link buttons.
53 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnCookiesLinkClicked);
54 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void,
55 OnCookieSettingsLinkClicked);
56 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnPermissionChanged);
57 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void,
58 OnPermissionsSettingsLinkClicked);
59 CHROMEGTK_CALLBACK_1(WebsiteSettingsPopupGtk, void, OnComboBoxShown,
60 GParamSpec*);
61
62 // Parent window.
63 GtkWindow* parent_;
64
65 // The container that contains the content of the popup.
66 GtkWidget* contents_;
67
68 // The widget relative to which the popup is positioned.
69 GtkWidget* anchor_;
70
71 // Provides colors and stuff.
72 ThemeServiceGtk* theme_service_;
73
74 // The popup bubble container.
75 BubbleGtk* bubble_;
76
77 Profile* profile_;
78
79 TabContentsWrapper* tab_contents_wrapper_;
80
81 // Container for the site info section content.
82 GtkWidget* site_info_contents_;
83 // Container for the cookies and site data section content.
84 GtkWidget* cookies_section_contents_;
85 // Container for the permissions section content.
86 GtkWidget* permissions_section_contents_;
87
88 WebsiteSettingsUIDelegate* delegate_;
89
90 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk);
91 };
92
93 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698