summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cookie_modal_dialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cookie_modal_dialog.h')
-rw-r--r--chrome/browser/cookie_modal_dialog.h36
1 files changed, 26 insertions, 10 deletions
diff --git a/chrome/browser/cookie_modal_dialog.h b/chrome/browser/cookie_modal_dialog.h
index d36bb93..f704bad 100644
--- a/chrome/browser/cookie_modal_dialog.h
+++ b/chrome/browser/cookie_modal_dialog.h
@@ -18,15 +18,24 @@ class PrefService;
// |NativeDialog| is a platform specific view.
class CookiePromptModalDialog : public AppModalDialog {
public:
+ enum DialogType {
+ DIALOG_TYPE_COOKIE = 0,
+ DIALOG_TYPE_LOCAL_STORAGE
+ // TODO(jorlow): Database
+ // TODO(michaeln): AppCache
+ };
+
// A union of data necessary to determine the type of message box to
// show.
CookiePromptModalDialog(TabContents* tab_contents,
- const std::string& host,
+ const GURL& origin,
const std::string& cookie_line,
CookiePromptModalDialogDelegate* delegate);
CookiePromptModalDialog(
TabContents* tab_contents,
- const BrowsingDataLocalStorageHelper::LocalStorageInfo& storage_info,
+ const GURL& origin,
+ const string16& key,
+ const string16& value,
CookiePromptModalDialogDelegate* delegate);
virtual ~CookiePromptModalDialog() {}
@@ -37,6 +46,13 @@ class CookiePromptModalDialog : public AppModalDialog {
virtual void AcceptWindow();
virtual void CancelWindow();
+ DialogType dialog_type() const { return dialog_type_; }
+ const GURL& origin() const { return origin_; }
+ const std::string& cookie_line() const { return cookie_line_; }
+ const string16& local_storage_key() const { return local_storage_key_; }
+ const string16& local_storage_value() const { return local_storage_value_; }
+ CookiePromptModalDialogDelegate* GetDelegate() { return delegate_; }
+
protected:
// AppModalDialog overrides.
virtual NativeDialog CreateNativeDialog();
@@ -45,17 +61,17 @@ class CookiePromptModalDialog : public AppModalDialog {
#endif
private:
- // Cookie host.
- std::string host_;
+ const DialogType dialog_type_;
- // Cookie to display.
- std::string cookie_line_;
+ // The origin connected to this request.
+ GURL origin_;
- // Local storage info to display.
- BrowsingDataLocalStorageHelper::LocalStorageInfo storage_info_;
+ // Cookie to display.
+ const std::string cookie_line_;
- // Whether we're showing cookie UI as opposed to other site data.
- bool cookie_ui_;
+ // LocalStorage key/value.
+ const string16 local_storage_key_;
+ const string16 local_storage_value_;
// Delegate. The caller should provide one in order to receive results
// from this delegate.