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

Side by Side Diff: trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model.h

Issue 24024006: Revert 221424 "Save password functionality added to the save pas..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
15 #include "chrome/common/content_settings.h" 14 #include "chrome/common/content_settings.h"
16 #include "chrome/common/custom_handlers/protocol_handler.h" 15 #include "chrome/common/custom_handlers/protocol_handler.h"
17 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
19 #include "content/public/common/media_stream_request.h" 18 #include "content/public/common/media_stream_request.h"
20 #include "ui/gfx/image/image.h" 19 #include "ui/gfx/image/image.h"
21 #include "url/gurl.h" 20 #include "url/gurl.h"
22 21
23 class ContentSettingBubbleModelDelegate; 22 class ContentSettingBubbleModelDelegate;
24 class Profile; 23 class Profile;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const content::NotificationSource& source, 105 const content::NotificationSource& source,
107 const content::NotificationDetails& details) OVERRIDE; 106 const content::NotificationDetails& details) OVERRIDE;
108 107
109 virtual void OnRadioClicked(int radio_index) {} 108 virtual void OnRadioClicked(int radio_index) {}
110 virtual void OnPopupClicked(int index) {} 109 virtual void OnPopupClicked(int index) {}
111 virtual void OnCustomLinkClicked() {} 110 virtual void OnCustomLinkClicked() {}
112 virtual void OnManageLinkClicked() {} 111 virtual void OnManageLinkClicked() {}
113 virtual void OnMediaMenuClicked(content::MediaStreamType type, 112 virtual void OnMediaMenuClicked(content::MediaStreamType type,
114 const std::string& selected_device_id) {} 113 const std::string& selected_device_id) {}
115 114
116 // Called by the view code when the cancel button in clicked by the user.
117 virtual void OnCancelClicked() {}
118
119 // Called by the view code when the bubble is closed by the user using the 115 // Called by the view code when the bubble is closed by the user using the
120 // Done button. 116 // Done button.
121 virtual void OnDoneClicked() {} 117 virtual void OnDoneClicked() {}
122 118
123 // Called by the view code when the save button in clicked by the user.
124 virtual void OnSaveClicked() {}
125
126 protected: 119 protected:
127 ContentSettingBubbleModel( 120 ContentSettingBubbleModel(
128 content::WebContents* web_contents, 121 content::WebContents* web_contents,
129 Profile* profile, 122 Profile* profile,
130 ContentSettingsType content_type); 123 ContentSettingsType content_type);
131 124
132 content::WebContents* web_contents() const { return web_contents_; } 125 content::WebContents* web_contents() const { return web_contents_; }
133 Profile* profile() const { return profile_; } 126 Profile* profile() const { return profile_; }
134 127
135 void set_title(const std::string& title) { bubble_content_.title = title; } 128 void set_title(const std::string& title) { bubble_content_.title = title; }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 177
185 private: 178 private:
186 void SetBlockedResources(); 179 void SetBlockedResources();
187 void SetTitle(); 180 void SetTitle();
188 void SetManageLink(); 181 void SetManageLink();
189 virtual void OnManageLinkClicked() OVERRIDE; 182 virtual void OnManageLinkClicked() OVERRIDE;
190 183
191 Delegate* delegate_; 184 Delegate* delegate_;
192 }; 185 };
193 186
194 class SavePasswordBubbleModel : public ContentSettingTitleAndLinkModel {
195 public:
196 SavePasswordBubbleModel(Delegate* delegate,
197 content::WebContents* web_contents,
198 Profile* profile);
199 virtual ~SavePasswordBubbleModel() {}
200 virtual void OnCancelClicked() OVERRIDE;
201 virtual void OnSaveClicked() OVERRIDE;
202 private:
203 // Sets the title of the bubble.
204 void SetTitle();
205
206 TabSpecificContentSettings::PasswordSavingState state_;
207
208 DISALLOW_COPY_AND_ASSIGN(SavePasswordBubbleModel);
209 };
210
211 class ContentSettingRPHBubbleModel : public ContentSettingTitleAndLinkModel { 187 class ContentSettingRPHBubbleModel : public ContentSettingTitleAndLinkModel {
212 public: 188 public:
213 ContentSettingRPHBubbleModel(Delegate* delegate, 189 ContentSettingRPHBubbleModel(Delegate* delegate,
214 content::WebContents* web_contents, 190 content::WebContents* web_contents,
215 Profile* profile, 191 Profile* profile,
216 ProtocolHandlerRegistry* registry, 192 ProtocolHandlerRegistry* registry,
217 ContentSettingsType content_type); 193 ContentSettingsType content_type);
218 194
219 virtual void OnRadioClicked(int radio_index) OVERRIDE; 195 virtual void OnRadioClicked(int radio_index) OVERRIDE;
220 virtual void OnDoneClicked() OVERRIDE; 196 virtual void OnDoneClicked() OVERRIDE;
(...skipping 12 matching lines...) Expand all
233 void IgnoreProtocolHandler(); 209 void IgnoreProtocolHandler();
234 void ClearOrSetPreviousHandler(); 210 void ClearOrSetPreviousHandler();
235 211
236 int selected_item_; 212 int selected_item_;
237 ProtocolHandlerRegistry* registry_; 213 ProtocolHandlerRegistry* registry_;
238 ProtocolHandler pending_handler_; 214 ProtocolHandler pending_handler_;
239 ProtocolHandler previous_handler_; 215 ProtocolHandler previous_handler_;
240 }; 216 };
241 217
242 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 218 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698