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

Side by Side Diff: chrome/browser/views/cookie_prompt_view.h

Issue 597061: Make the setItem CONTENT_SETTING_ASK dialog more useful by showing the actual... (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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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_VIEWS_COOKIE_PROMPT_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_COOKIE_PROMPT_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_COOKIE_PROMPT_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_COOKIE_PROMPT_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 class CookieInfoView; 27 class CookieInfoView;
28 class CookiePromptModalDialog; 28 class CookiePromptModalDialog;
29 class LocalStorageInfoView; 29 class LocalStorageInfoView;
30 class Profile; 30 class Profile;
31 class Timer; 31 class Timer;
32 32
33 // Cookie alert dialog UI. 33 // Cookie alert dialog UI.
34 class CookiePromptView : public views::View, 34 class CookiePromptView : public views::View,
35 public ModalDialogDelegate, 35 public ModalDialogDelegate,
36 public views::ButtonListener, 36 public views::ButtonListener,
37 public views::LinkController, 37 public views::LinkController,
38 public CookieInfoViewDelegate { 38 public CookieInfoViewDelegate {
39 public: 39 public:
40 CookiePromptView( 40 CookiePromptView(
41 CookiePromptModalDialog* parent, 41 CookiePromptModalDialog* parent,
42 gfx::NativeWindow root_window, 42 gfx::NativeWindow root_window,
43 Profile* profile, 43 Profile* profile);
44 const BrowsingDataLocalStorageHelper::LocalStorageInfo&
45 local_storage_info,
46 const std::string& host,
47 const std::string& cookie_line,
48 CookiePromptModalDialogDelegate* delegate,
49 bool cookie_ui);
50 44
51 virtual ~CookiePromptView(); 45 virtual ~CookiePromptView();
52 46
53 protected: 47 protected:
54 // views::View overrides. 48 // views::View overrides.
55 virtual gfx::Size GetPreferredSize(); 49 virtual gfx::Size GetPreferredSize();
56 virtual void ViewHierarchyChanged(bool is_add, 50 virtual void ViewHierarchyChanged(bool is_add,
57 views::View* parent, 51 views::View* parent,
58 views::View* child); 52 views::View* child);
59 53
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 100
107 // True if cookie info view is currently shown and window expanded. 101 // True if cookie info view is currently shown and window expanded.
108 bool expanded_view_; 102 bool expanded_view_;
109 103
110 // True if the outcome of this dialog has been signaled to the delegate. 104 // True if the outcome of this dialog has been signaled to the delegate.
111 bool signaled_; 105 bool signaled_;
112 106
113 // Prompt window title. 107 // Prompt window title.
114 std::wstring title_; 108 std::wstring title_;
115 109
116 // Whether we're showing cookie UI as opposed to other site data.
117 bool cookie_ui_;
118
119 // A pointer to the AppModalDialog that owns us. 110 // A pointer to the AppModalDialog that owns us.
120 CookiePromptModalDialog* parent_; 111 CookiePromptModalDialog* parent_;
121 112
122 gfx::NativeWindow root_window_; 113 gfx::NativeWindow root_window_;
123 114
124 // Cookie / local storage host.
125 std::string host_;
126
127 // Displayed cookie. Only used when |cookie_ui_| is true.
128 std::string cookie_line_;
129
130 // Displayed local storage info. Only used when |cookie_ui_| is false.
131 BrowsingDataLocalStorageHelper::LocalStorageInfo local_storage_info_;
132
133 CookiePromptModalDialogDelegate* delegate_;
134
135 DISALLOW_COPY_AND_ASSIGN(CookiePromptView); 115 DISALLOW_COPY_AND_ASSIGN(CookiePromptView);
136 }; 116 };
137 117
138 #endif // CHROME_BROWSER_VIEWS_COOKIE_PROMPT_VIEW_H_ 118 #endif // CHROME_BROWSER_VIEWS_COOKIE_PROMPT_VIEW_H_
139 119
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698