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

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: " 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" 9 #include "chrome/browser/ui/website_settings_ui.h"
10 10
11 #include <gtk/gtk.h> 11 #include <gtk/gtk.h>
12 12
13 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 13 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
14 #include "googleurl/src/gurl.h"
tfarina 2012/05/31 23:58:08 nit: please, forward declare this instead.
markusheintz_ 2012/06/01 10:06:06 Done.
14 15
15 class Browser; 16 class Browser;
16 class BubbleGtk; 17 class BubbleGtk;
tfarina 2012/05/31 23:58:08 remove this forward declaration.
markusheintz_ 2012/06/01 10:06:06 Done.
18
19 namespace content {
20 class CertStore;
21 struct SSLStatus;
22 }
23
17 class GtkThemeService; 24 class GtkThemeService;
18 class Profile; 25 class Profile;
19 class TabContentsWrapper; 26 class TabContentsWrapper;
20 class WebsiteSettings; 27 class WebsiteSettings;
21 28
22 // GTK implementation of the website settings UI. The website settings UI is 29 // GTK implementation of the website settings UI. The website settings UI is
23 // displayed in a popup that is positioned relative the an anchor element. 30 // displayed in a popup that is positioned relative the an anchor element.
tfarina 2012/05/31 23:58:08 nit: relative to an anchor element? can this comme
markusheintz_ 2012/06/01 10:06:06 I guess this part of the comment is not really nec
tfarina 2012/06/01 21:20:26 Yes, much cleaner now. Thanks.
24 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI, 31 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
25 public BubbleDelegateGtk { 32 public BubbleDelegateGtk {
26 public: 33 public:
34 // Creates a |WebsiteSettingsPopupGtk| and displays the UI. The |url|
35 // contains the omnibox URL of the currently active tab, |parent| contains
36 // the currently active window, |profile| contains the currently active
37 // profile and |ssl| contains the |SSLStatus| of the connection to the
38 // website in the currently active tab that is wrapped by the
39 // |tab_contents_wrapper|.
40 static void Show(gfx::NativeWindow parent,
41 Profile* profile,
42 TabContentsWrapper* tab_contents_wrapper,
43 const GURL& url,
44 const content::SSLStatus& ssl);
45
27 WebsiteSettingsPopupGtk(gfx::NativeWindow parent, 46 WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
Ben Goodger (Google) 2012/05/31 20:51:51 can your ctor be private then?
markusheintz_ 2012/06/01 10:06:06 Done.
28 Profile* profile, 47 Profile* profile,
29 TabContentsWrapper* wrapper); 48 TabContentsWrapper* wrapper,
30 virtual ~WebsiteSettingsPopupGtk(); 49 const GURL& url,
50 const content::SSLStatus& ssl);
31 51
32 // WebsiteSettingsUI implementations. 52 // WebsiteSettingsUI implementations.
tfarina 2012/05/31 23:58:08 I bet you can also move these overrides and the Bu
markusheintz_ 2012/06/01 10:06:06 The WebsiteSettingsUI methods are the public API u
33 virtual void SetPresenter(WebsiteSettings* presenter) OVERRIDE;
34 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE; 53 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE;
35 virtual void SetPermissionInfo( 54 virtual void SetPermissionInfo(
36 const PermissionInfoList& permission_info_list) OVERRIDE; 55 const PermissionInfoList& permission_info_list) OVERRIDE;
37 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; 56 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE;
38 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; 57 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE;
39 58
40 // BubbleDelegateGtk implementation. 59 // BubbleDelegateGtk implementation.
41 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; 60 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
42 61
43 private: 62 private:
63 virtual ~WebsiteSettingsPopupGtk();
64
44 // Layouts the different sections retrieved from the model. 65 // Layouts the different sections retrieved from the model.
45 void InitContents(); 66 void InitContents();
46 67
47 // Removes all children of |container|. 68 // Removes all children of |container|.
48 void ClearContainer(GtkWidget* container); 69 void ClearContainer(GtkWidget* container);
49 70
50 // Creates a label that contains the given |text| and has the given |width|. 71 // Creates a label that contains the given |text| and has the given |width|.
51 GtkWidget* CreateTextLabel(const std::string& text, int width); 72 GtkWidget* CreateTextLabel(const std::string& text, int width);
52 73
53 // Creates a popup section and returns a virtual box that contains the 74 // 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_; 122 GtkWidget* permissions_section_contents_;
102 123
103 // Container for the identity tab content. 124 // Container for the identity tab content.
104 GtkWidget* identity_tab_contents_; 125 GtkWidget* identity_tab_contents_;
105 126
106 // Container for the information about the first visit date of the website. 127 // Container for the information about the first visit date of the website.
107 GtkWidget* first_visit_contents_; 128 GtkWidget* first_visit_contents_;
108 129
109 // The UI translates user actions to specific events and forwards them to the 130 // The UI translates user actions to specific events and forwards them to the
110 // |presenter_|. The |presenter_| handles these events and updates the UI. 131 // |presenter_|. The |presenter_| handles these events and updates the UI.
111 WebsiteSettings* presenter_; 132 scoped_ptr<WebsiteSettings> presenter_;
tfarina 2012/05/31 23:58:08 include base/memory/scoped_ptr.h for this.
markusheintz_ 2012/06/01 10:06:06 Done.
112 133
113 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk); 134 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk);
114 }; 135 };
115 136
116 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_ 137 #endif // CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698