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

Side by Side Diff: chrome/browser/cookie_modal_dialog.h

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/cookie_modal_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_
6 #define CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_
7
8 #include <string>
9
10 #include "chrome/browser/app_modal_dialog.h"
11 #include "chrome/browser/browsing_data_local_storage_helper.h"
12 #include "chrome/browser/cookie_prompt_modal_dialog_delegate.h"
13 #include "googleurl/src/gurl.h"
14
15
16 // A controller+model class for cookie and local storage warning prompt.
17 // |NativeDialog| is a platform specific view.
18 class CookiePromptModalDialog : public AppModalDialog {
19 public:
20 // A union of data necessary to determine the type of message box to
21 // show.
22 CookiePromptModalDialog(TabContents* tab_contents,
23 const GURL& url,
24 const std::string& cookie_line,
25 CookiePromptModalDialogDelegate* delegate);
26 CookiePromptModalDialog(
27 TabContents* tab_contents,
28 const BrowsingDataLocalStorageHelper::LocalStorageInfo& storage_info,
29 CookiePromptModalDialogDelegate* delegate);
30 virtual ~CookiePromptModalDialog() {}
31
32 // AppModalDialog overrides.
33 virtual int GetDialogButtons();
34 virtual void AcceptWindow();
35 virtual void CancelWindow();
36
37 protected:
38 // AppModalDialog overrides.
39 virtual NativeDialog CreateNativeDialog();
40 #if defined(OS_LINUX)
41 virtual void HandleDialogResponse(GtkDialog* dialog, gint response_id);
42 #endif
43
44 private:
45 // Cookie url.
46 GURL url_;
47
48 // Cookie to display.
49 std::string cookie_line_;
50
51 // Local storage info to display.
52 BrowsingDataLocalStorageHelper::LocalStorageInfo storage_info_;
53
54 // Whether we're showing cookie UI as opposed to other site data.
55 bool cookie_ui_;
56
57 // Delegate. The caller should provide one in order to receive results
58 // from this delegate.
59 CookiePromptModalDialogDelegate* delegate_;
60
61 DISALLOW_COPY_AND_ASSIGN(CookiePromptModalDialog);
62 };
63
64 #endif // CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_
65
OLDNEW
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/cookie_modal_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698