| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d628ff2211c599b55b6ed107dea2312243dbc694
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/gtk/website_settings_popup_gtk.h
|
| @@ -0,0 +1,95 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
|
| +#define CHROME_BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
|
| +#pragma once
|
| +
|
| +#include "chrome/browser/ui/website_settings_ui.h"
|
| +
|
| +#include <vector>
|
| +
|
| +#include <gtk/gtk.h>
|
| +
|
| +#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
|
| +#include "chrome/browser/website_settings_model.h"
|
| +#include "content/public/common/ssl_status.h"
|
| +#include "googleurl/src/gurl.h"
|
| +
|
| +using content::SSLStatus;
|
| +
|
| +class BubbleGtk;
|
| +class Profile;
|
| +class TabContentsWrapper;
|
| +class ThemeServiceGtk;
|
| +
|
| +//
|
| +class WebsiteSettingsPopupGtk : public WebsiteSettingsUI,
|
| + public BubbleDelegateGtk {
|
| + public:
|
| + WebsiteSettingsPopupGtk(gfx::NativeWindow parent,
|
| + Profile* profile,
|
| + TabContentsWrapper* wrapper,
|
| + const GURL& url,
|
| + const SSLStatus& ssl,
|
| + bool show_history);
|
| + virtual ~WebsiteSettingsPopupGtk();
|
| +
|
| + // WebsiteSettingsUI implementations.
|
| + virtual void SetSiteInfo(const std::string site_info) OVERRIDE;
|
| + virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) OVERRIDE;
|
| + virtual void SetPermissionInfo(
|
| + const PermissionInfoList& permission_info_list) OVERRIDE;
|
| +
|
| + // BubbleDelegateGtk implementation.
|
| + virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
|
| +
|
| + private:
|
| + // Layouts the different sections retrieved from the model.
|
| + void InitContents();
|
| +
|
| + // Removes all children of |container|.
|
| + void ClearContainer(GtkWidget* container);
|
| +
|
| + // Creates a popup section.
|
| + GtkWidget* CreateSection(std::string section_title,
|
| + GtkWidget* section_content);
|
| +
|
| + // Link button callbacks.
|
| + CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnCookiesLinkClicked);
|
| + CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void,
|
| + OnCookieSettingsLinkClicked);
|
| + CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void, OnPermissionChanged);
|
| + CHROMEGTK_CALLBACK_0(WebsiteSettingsPopupGtk, void,
|
| + OnPermissionsSettingsLinkClicked);
|
| +
|
| + scoped_ptr<WebsiteSettingsModel> website_settings_;
|
| +
|
| + // Parent window.
|
| + GtkWindow* parent_;
|
| +
|
| + // The virtual box containing the sections.
|
| + GtkWidget* contents_;
|
| +
|
| + // The widget relative to which we are positioned.
|
| + GtkWidget* anchor_;
|
| +
|
| + // Provides colors and stuff.
|
| + ThemeServiceGtk* theme_service_;
|
| +
|
| + BubbleGtk* bubble_;
|
| +
|
| + Profile* profile_;
|
| +
|
| + TabContentsWrapper* tab_contents_wrapper_;
|
| +
|
| + // UI elements
|
| + GtkWidget* site_info_contents_;
|
| + GtkWidget* cookies_section_content_;
|
| + GtkWidget* permissions_section_content_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupGtk);
|
| +};
|
| +
|
| +#endif // BROWSER_UI_GTK_WEBSITE_SETTINGS_POPUP_GTK_H_
|
|
|