OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/website_settings_ui.h" | 9 #include "chrome/browser/ui/website_settings_ui.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI, | 24 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI, |
25 public BubbleDelegateGtk { | 25 public BubbleDelegateGtk { |
26 public: | 26 public: |
27 WebsiteSettingsPopupGtk(gfx::NativeWindow parent, | 27 WebsiteSettingsPopupGtk(gfx::NativeWindow parent, |
28 Profile* profile, | 28 Profile* profile, |
29 TabContentsWrapper* wrapper); | 29 TabContentsWrapper* wrapper); |
30 virtual ~WebsiteSettingsPopupGtk(); | 30 virtual ~WebsiteSettingsPopupGtk(); |
31 | 31 |
32 // WebsiteSettingsUI implementations. | 32 // WebsiteSettingsUI implementations. |
33 virtual void SetPresenter(WebsiteSettings* presenter) OVERRIDE; | 33 virtual void SetPresenter(WebsiteSettings* presenter) OVERRIDE; |
34 virtual void SetSiteInfo(const std::string& site_info) OVERRIDE; | |
35 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE; | 34 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE; |
36 virtual void SetPermissionInfo( | 35 virtual void SetPermissionInfo( |
37 const PermissionInfoList& permission_info_list) OVERRIDE; | 36 const PermissionInfoList& permission_info_list) OVERRIDE; |
| 37 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; |
38 | 38 |
39 // BubbleDelegateGtk implementation. | 39 // BubbleDelegateGtk implementation. |
40 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; | 40 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; |
41 | 41 |
42 private: | 42 private: |
43 // Layouts the different sections retrieved from the model. | 43 // Layouts the different sections retrieved from the model. |
44 void InitContents(); | 44 void InitContents(); |
45 | 45 |
46 // Removes all children of |container|. | 46 // Removes all children of |container|. |
47 void ClearContainer(GtkWidget* container); | 47 void ClearContainer(GtkWidget* container); |
48 | 48 |
49 // Creates a popup section and returns a virtual box that contains the section | 49 // Creates a label that contains the given |text| and has the given |width|. |
50 // content. | 50 GtkWidget* CreateTextLabel(const std::string& text, int width); |
| 51 |
| 52 // Creates a popup section and returns a virtual box that contains the |
| 53 // section content. |
51 GtkWidget* CreateSection(std::string section_title, | 54 GtkWidget* CreateSection(std::string section_title, |
52 GtkWidget* section_content); | 55 GtkWidget* section_content); |
53 | 56 |
54 // Callbacks for the link buttons. | 57 // Callbacks for the link buttons. |
55 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnCookiesLinkClicked); | 58 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnCookiesLinkClicked); |
56 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnPermissionChanged); | 59 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnPermissionChanged); |
57 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, | 60 CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, |
58 OnPermissionsSettingsLinkClicked); | 61 OnPermissionsSettingsLinkClicked); |
59 CHROMEGTK_CALLBACK_1(WebsiteSettingsPopupGtk, void, OnComboBoxShown, | 62 CHROMEGTK_CALLBACK_1(WebsiteSettingsPopupGtk, void, OnComboBoxShown, |
60 GParamSpec*); | 63 GParamSpec*); |
(...skipping 14 matching lines...) Expand all Loading... |
75 BubbleGtk* bubble_; | 78 BubbleGtk* bubble_; |
76 | 79 |
77 Profile* profile_; | 80 Profile* profile_; |
78 | 81 |
79 TabContentsWrapper* tab_contents_wrapper_; | 82 TabContentsWrapper* tab_contents_wrapper_; |
80 | 83 |
81 // The browser object of the current window. This is needed to open the | 84 // The browser object of the current window. This is needed to open the |
82 // settings page in a new tab. | 85 // settings page in a new tab. |
83 Browser* browser_; | 86 Browser* browser_; |
84 | 87 |
85 // Container for the site info section content. | 88 // Container for the popup header content. |
86 GtkWidget* site_info_contents_; | 89 GtkWidget* header_box_; |
| 90 |
87 // Container for the cookies and site data section content. | 91 // Container for the cookies and site data section content. |
88 GtkWidget* cookies_section_contents_; | 92 GtkWidget* cookies_section_contents_; |
| 93 |
89 // Container for the permissions section content. | 94 // Container for the permissions section content. |
90 GtkWidget* permissions_section_contents_; | 95 GtkWidget* permissions_section_contents_; |
91 | 96 |
| 97 // Container for the identity tab content. |
| 98 GtkWidget* identity_tab_contents_; |
| 99 |
92 // The UI translates user actions to specific events and forwards them to the | 100 // The UI translates user actions to specific events and forwards them to the |
93 // |presenter_|. The |presenter_| handles these events and updates the UI. | 101 // |presenter_|. The |presenter_| handles these events and updates the UI. |
94 WebsiteSettings* presenter_; | 102 WebsiteSettings* presenter_; |
95 | 103 |
96 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk); | 104 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk); |
97 }; | 105 }; |
98 | 106 |
99 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ | 107 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ |
OLD | NEW |