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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.h

Issue 23537029: Save password functionality added to the save password bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review 2 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
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_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chrome/browser/content_settings/content_settings_usages_state.h" 15 #include "chrome/browser/content_settings/content_settings_usages_state.h"
16 #include "chrome/browser/content_settings/local_shared_objects_container.h" 16 #include "chrome/browser/content_settings/local_shared_objects_container.h"
17 #include "chrome/browser/media/media_stream_devices_controller.h" 17 #include "chrome/browser/media/media_stream_devices_controller.h"
18 #include "chrome/browser/password_manager/password_form_manager.h"
18 #include "chrome/common/content_settings.h" 19 #include "chrome/common/content_settings.h"
19 #include "chrome/common/content_settings_types.h" 20 #include "chrome/common/content_settings_types.h"
20 #include "chrome/common/custom_handlers/protocol_handler.h" 21 #include "chrome/common/custom_handlers/protocol_handler.h"
21 #include "content/public/browser/notification_observer.h" 22 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/web_contents_observer.h" 24 #include "content/public/browser/web_contents_observer.h"
24 #include "content/public/browser/web_contents_user_data.h" 25 #include "content/public/browser/web_contents_user_data.h"
25 #include "content/public/common/media_stream_request.h" 26 #include "content/public/common/media_stream_request.h"
26 #include "net/cookies/canonical_cookie.h" 27 #include "net/cookies/canonical_cookie.h"
27 28
28 class CookiesTreeModel; 29 class CookiesTreeModel;
29 class PasswordFormManager;
30 class Profile; 30 class Profile;
31 31
32 namespace content { 32 namespace content {
33 class RenderViewHost; 33 class RenderViewHost;
34 } 34 }
35 35
36 namespace net { 36 namespace net {
37 class CookieOptions; 37 class CookieOptions;
38 } 38 }
39 39
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 int64 frame_id, 288 int64 frame_id,
289 int64 parent_frame_id, 289 int64 parent_frame_id,
290 bool is_main_frame, 290 bool is_main_frame,
291 const GURL& validated_url, 291 const GURL& validated_url,
292 bool is_error_page, 292 bool is_error_page,
293 bool is_iframe_srcdoc, 293 bool is_iframe_srcdoc,
294 content::RenderViewHost* render_view_host) OVERRIDE; 294 content::RenderViewHost* render_view_host) OVERRIDE;
295 virtual void AppCacheAccessed(const GURL& manifest_url, 295 virtual void AppCacheAccessed(const GURL& manifest_url,
296 bool blocked_by_policy) OVERRIDE; 296 bool blocked_by_policy) OVERRIDE;
297 297
298 // If user clicks on 'save password' this will have the password saved upon 298 // Called when the chooses to save or blacklist a password. Instructs
299 // the next navigation. 299 // |form_to_save| to perfom the chosen action when the next navigation occurs
Peter Kasting 2013/09/11 21:49:39 Nit: form_to_save_ ? Perhaps this could be improv
npentrel 2013/09/12 10:08:44 Done.
300 bool PasswordAccepted(); 300 // or when the tab is closed.
301 301 bool SetPasswordAction(PasswordFormManager::PasswordAction password_action);
302 // If user clicks on 'never save password for this site' this have the
303 // password blacklisted upon the next navigation.
304 bool PasswordFormBlacklisted();
305 302
306 // Message handlers. Public for testing. 303 // Message handlers. Public for testing.
307 void OnContentBlocked(ContentSettingsType type, 304 void OnContentBlocked(ContentSettingsType type,
308 const std::string& resource_identifier); 305 const std::string& resource_identifier);
309 void OnContentAllowed(ContentSettingsType type); 306 void OnContentAllowed(ContentSettingsType type);
310 307
311 // These methods are invoked on the UI thread by the static functions above. 308 // These methods are invoked on the UI thread by the static functions above.
312 // Public for testing. 309 // Public for testing.
313 void OnCookiesRead(const GURL& url, 310 void OnCookiesRead(const GURL& url,
314 const GURL& first_party_url, 311 const GURL& first_party_url,
(...skipping 20 matching lines...) Expand all
335 bool allowed); 332 bool allowed);
336 333
337 // This method is called to update the status about the microphone and 334 // This method is called to update the status about the microphone and
338 // camera stream access. |request_permissions| contains a list of requested 335 // camera stream access. |request_permissions| contains a list of requested
339 // media stream types and the permission for each type. 336 // media stream types and the permission for each type.
340 void OnMediaStreamPermissionSet( 337 void OnMediaStreamPermissionSet(
341 const GURL& request_origin, 338 const GURL& request_origin,
342 const MediaStreamDevicesController::MediaStreamTypePermissionMap& 339 const MediaStreamDevicesController::MediaStreamTypePermissionMap&
343 request_permissions); 340 request_permissions);
344 341
345 // This method is called to pass the |form_to_save| on a successful password 342 // Called when a password form is submitted. |form_to_save| is the submitted
346 // submission. It also updates the status of the save password content 343 // form. This form can save or blacklist the login credentials via
347 // setting. 344 // PasswordAccepted() and PasswordFormBlacklisted respectively.
Peter Kasting 2013/09/11 21:49:39 This comment is out of date; also see comments abo
npentrel 2013/09/12 10:08:44 Done.
348 void OnPasswordSubmitted(PasswordFormManager* form_to_save); 345 void OnPasswordSubmitted(PasswordFormManager* form_to_save);
349 346
350 // There methods are called to update the status about MIDI access. 347 // There methods are called to update the status about MIDI access.
351 void OnMIDISysExAccessed(const GURL& reqesting_origin); 348 void OnMIDISysExAccessed(const GURL& reqesting_origin);
352 void OnMIDISysExAccessBlocked(const GURL& requesting_origin); 349 void OnMIDISysExAccessBlocked(const GURL& requesting_origin);
353 350
354 // Adds the given |SiteDataObserver|. The |observer| is notified when a 351 // Adds the given |SiteDataObserver|. The |observer| is notified when a
355 // locale shared object, like for example a cookie, is accessed. 352 // locale shared object, like for example a cookie, is accessed.
356 void AddSiteDataObserver(SiteDataObserver* observer); 353 void AddSiteDataObserver(SiteDataObserver* observer);
357 354
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 GURL media_stream_access_origin_; 426 GURL media_stream_access_origin_;
430 427
431 // The PasswordFormManager managing the form we're asking the user about, 428 // The PasswordFormManager managing the form we're asking the user about,
432 // and should update as per the decision. 429 // and should update as per the decision.
433 scoped_ptr<PasswordFormManager> form_to_save_; 430 scoped_ptr<PasswordFormManager> form_to_save_;
434 431
435 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); 432 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings);
436 }; 433 };
437 434
438 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 435 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698