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

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

Issue 10440092: Remove any platform specific code from the chrome/browser/website_settings.* . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort includes Created 8 years, 6 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
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"
10
11 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
12 10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 14 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
15 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
14 16
15 class Browser; 17 class Browser;
16 class BubbleGtk;
17 class GtkThemeService; 18 class GtkThemeService;
19 class GURL;
18 class Profile; 20 class Profile;
19 class TabContentsWrapper; 21 class TabContentsWrapper;
20 class WebsiteSettings; 22 class WebsiteSettings;
21 23
22 // GTK implementation of the website settings UI. The website settings UI is 24 namespace content {
23 // displayed in a popup that is positioned relative the an anchor element. 25 struct SSLStatus;
26 }
27
28 // GTK implementation of the website settings UI.
24 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI, 29 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
25 public BubbleDelegateGtk { 30 public BubbleDelegateGtk {
26 public: 31 public:
32 // Creates a |WebsiteSettingsPopupGtk| and displays the UI. The |url|
33 // contains the omnibox URL of the currently active tab, |parent| contains
34 // the currently active window, |profile| contains the currently active
35 // profile and |ssl| contains the |SSLStatus| of the connection to the
36 // website in the currently active tab that is wrapped by the
37 // |tab_contents_wrapper|.
38 static void Show(gfx::NativeWindow parent,
39 Profile* profile,
40 TabContentsWrapper* tab_contents_wrapper,
41 const GURL& url,
42 const content::SSLStatus& ssl);
43
44 private:
27 WebsiteSettingsPopupGtk(gfx::NativeWindow parent, 45 WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
28 Profile* profile, 46 Profile* profile,
29 TabContentsWrapper* wrapper); 47 TabContentsWrapper* wrapper,
30 virtual ~WebsiteSettingsPopupGtk(); 48 const GURL& url,
49 const content::SSLStatus& ssl);
31 50
32 // WebsiteSettingsUI implementations. 51 // WebsiteSettingsUI implementations.
33 virtual void SetPresenter(WebsiteSettings* presenter) OVERRIDE;
34 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE; 52 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE;
35 virtual void SetPermissionInfo( 53 virtual void SetPermissionInfo(
36 const PermissionInfoList& permission_info_list) OVERRIDE; 54 const PermissionInfoList& permission_info_list) OVERRIDE;
37 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; 55 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE;
38 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; 56 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE;
39 57
40 // BubbleDelegateGtk implementation. 58 // BubbleDelegateGtk implementation.
41 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; 59 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
42 60
43 private: 61
62 virtual ~WebsiteSettingsPopupGtk();
63
44 // Layouts the different sections retrieved from the model. 64 // Layouts the different sections retrieved from the model.
45 void InitContents(); 65 void InitContents();
46 66
47 // Removes all children of |container|. 67 // Removes all children of |container|.
48 void ClearContainer(GtkWidget* container); 68 void ClearContainer(GtkWidget* container);
49 69
50 // Creates a label that contains the given |text| and has the given |width|. 70 // Creates a label that contains the given |text| and has the given |width|.
51 GtkWidget* CreateTextLabel(const std::string& text, int width); 71 GtkWidget* CreateTextLabel(const std::string& text, int width);
52 72
53 // Creates a popup section and returns a virtual box that contains the 73 // Creates a popup section and returns a virtual box that contains the
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 GtkWidget* permissions_section_contents_; 121 GtkWidget* permissions_section_contents_;
102 122
103 // Container for the identity tab content. 123 // Container for the identity tab content.
104 GtkWidget* identity_tab_contents_; 124 GtkWidget* identity_tab_contents_;
105 125
106 // Container for the information about the first visit date of the website. 126 // Container for the information about the first visit date of the website.
107 GtkWidget* first_visit_contents_; 127 GtkWidget* first_visit_contents_;
108 128
109 // The UI translates user actions to specific events and forwards them to the 129 // The UI translates user actions to specific events and forwards them to the
110 // |presenter_|. The |presenter_| handles these events and updates the UI. 130 // |presenter_|. The |presenter_| handles these events and updates the UI.
111 WebsiteSettings* presenter_; 131 scoped_ptr<WebsiteSettings> presenter_;
112 132
113 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk); 133 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk);
114 }; 134 };
115 135
116 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ 136 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/website_settings_popup_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698