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

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: Address comments 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/website_settings_ui.h"
tfarina 2012/06/01 21:20:26 nit: group with the other includes below. This is
markusheintz_ 2012/06/02 21:22:33 Done.
10 10
11 #include <gtk/gtk.h> 11 #include <gtk/gtk.h>
12 12
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"
14 15
15 class Browser; 16 class Browser;
16 class BubbleGtk; 17 class BubbleGtk;
tfarina 2012/06/01 21:20:26 nit: forgot to remove?
markusheintz_ 2012/06/02 21:22:33 uups sorry. Removed.
18
19 namespace content {
tfarina 2012/06/01 21:20:26 please, move this after the forward declarations b
markusheintz_ 2012/06/02 21:22:33 Done.
20 struct SSLStatus;
21 }
22
17 class GtkThemeService; 23 class GtkThemeService;
tfarina 2012/06/01 21:20:26 group these forward declarations with the Browser
markusheintz_ 2012/06/02 21:22:33 Done.
24 class GURL;
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.
23 // displayed in a popup that is positioned relative the an anchor element.
24 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI, 30 class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
25 public BubbleDelegateGtk { 31 public BubbleDelegateGtk {
26 public: 32 public:
27 WebsiteSettingsPopupGtk(gfx::NativeWindow parent, 33 // Creates a |WebsiteSettingsPopupGtk| and displays the UI. The |url|
28 Profile* profile, 34 // contains the omnibox URL of the currently active tab, |parent| contains
29 TabContentsWrapper* wrapper); 35 // the currently active window, |profile| contains the currently active
30 virtual ~WebsiteSettingsPopupGtk(); 36 // profile and |ssl| contains the |SSLStatus| of the connection to the
37 // website in the currently active tab that is wrapped by the
38 // |tab_contents_wrapper|.
39 static void Show(gfx::NativeWindow parent,
40 Profile* profile,
41 TabContentsWrapper* tab_contents_wrapper,
42 const GURL& url,
43 const content::SSLStatus& ssl);
31 44
32 // WebsiteSettingsUI implementations. 45 // WebsiteSettingsUI implementations.
33 virtual void SetPresenter(WebsiteSettings* presenter) OVERRIDE;
34 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE; 46 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE;
tfarina 2012/06/01 21:20:26 I'm away from my Linux desktop, but I think I can
markusheintz_ 2012/06/02 21:22:33 hm ... why should I make these methods private her
tfarina 2012/06/03 16:09:04 The reason I suggested this is: - WebsiteSettings
markusheintz_ 2012/06/04 16:33:54 You are right. Thanks a lot for the long descripti
35 virtual void SetPermissionInfo( 47 virtual void SetPermissionInfo(
36 const PermissionInfoList& permission_info_list) OVERRIDE; 48 const PermissionInfoList& permission_info_list) OVERRIDE;
37 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; 49 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE;
38 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; 50 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE;
39 51
40 // BubbleDelegateGtk implementation. 52 // BubbleDelegateGtk implementation.
41 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; 53 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
42 54
43 private: 55 private:
56 WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
57 Profile* profile,
58 TabContentsWrapper* wrapper,
59 const GURL& url,
60 const content::SSLStatus& ssl);
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

Powered by Google App Engine
This is Rietveld 408576698