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

Unified 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 (tfarina) Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/website_settings_popup_gtk.h
diff --git a/chrome/browser/ui/gtk/website_settings_popup_gtk.h b/chrome/browser/ui/gtk/website_settings_popup_gtk.h
index be74f67938b494b6144a801698e879df6e74586c..8d1bdb488a95d022efc2aa46dee10f143cd75fae 100644
--- a/chrome/browser/ui/gtk/website_settings_popup_gtk.h
+++ b/chrome/browser/ui/gtk/website_settings_popup_gtk.h
@@ -6,31 +6,41 @@
#define CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
#pragma once
-#include "chrome/browser/ui/website_settings_ui.h"
-
#include <gtk/gtk.h>
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
+#include "chrome/browser/ui/website_settings/website_settings_ui.h"
class Browser;
-class BubbleGtk;
class GtkThemeService;
+class GURL;
class Profile;
class TabContentsWrapper;
class WebsiteSettings;
-// GTK implementation of the website settings UI. The website settings UI is
-// displayed in a popup that is positioned relative the an anchor element.
+namespace content {
+struct SSLStatus;
+}
+
+// GTK implementation of the website settings UI.
class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
public BubbleDelegateGtk {
public:
- WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
- Profile* profile,
- TabContentsWrapper* wrapper);
- virtual ~WebsiteSettingsPopupGtk();
+ // Creates a |WebsiteSettingsPopupGtk| and displays the UI. The |url|
+ // contains the omnibox URL of the currently active tab, |parent| contains
+ // the currently active window, |profile| contains the currently active
+ // profile and |ssl| contains the |SSLStatus| of the connection to the
+ // website in the currently active tab that is wrapped by the
+ // |tab_contents_wrapper|.
+ static void Show(gfx::NativeWindow parent,
+ Profile* profile,
+ TabContentsWrapper* tab_contents_wrapper,
+ const GURL& url,
+ const content::SSLStatus& ssl);
// WebsiteSettingsUI implementations.
- virtual void SetPresenter(WebsiteSettings* presenter) OVERRIDE;
virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE;
virtual void SetPermissionInfo(
const PermissionInfoList& permission_info_list) OVERRIDE;
@@ -41,6 +51,14 @@ class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
private:
+ WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
+ Profile* profile,
+ TabContentsWrapper* wrapper,
+ const GURL& url,
+ const content::SSLStatus& ssl);
+
+ virtual ~WebsiteSettingsPopupGtk();
+
// Layouts the different sections retrieved from the model.
void InitContents();
@@ -108,7 +126,7 @@ class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
// The UI translates user actions to specific events and forwards them to the
// |presenter_|. The |presenter_| handles these events and updates the UI.
- WebsiteSettings* presenter_;
+ scoped_ptr<WebsiteSettings> presenter_;
DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk);
};

Powered by Google App Engine
This is Rietveld 408576698