| OLD | NEW |
| 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 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const ContentSettingsUsagesState& geolocation_usages_state() const { | 215 const ContentSettingsUsagesState& geolocation_usages_state() const { |
| 216 return geolocation_usages_state_; | 216 return geolocation_usages_state_; |
| 217 } | 217 } |
| 218 | 218 |
| 219 // Returns the ContentSettingsUsageState that controls the MIDI usage on | 219 // Returns the ContentSettingsUsageState that controls the MIDI usage on |
| 220 // this page. | 220 // this page. |
| 221 const ContentSettingsUsagesState& midi_usages_state() const { | 221 const ContentSettingsUsagesState& midi_usages_state() const { |
| 222 return midi_usages_state_; | 222 return midi_usages_state_; |
| 223 } | 223 } |
| 224 | 224 |
| 225 void OnPasswordSubmitted(PasswordFormManager* form_to_save); | |
| 226 | |
| 227 // Call to indicate that there is a protocol handler pending user approval. | 225 // Call to indicate that there is a protocol handler pending user approval. |
| 228 void set_pending_protocol_handler(const ProtocolHandler& handler) { | 226 void set_pending_protocol_handler(const ProtocolHandler& handler) { |
| 229 pending_protocol_handler_ = handler; | 227 pending_protocol_handler_ = handler; |
| 230 } | 228 } |
| 231 | 229 |
| 232 const ProtocolHandler& pending_protocol_handler() const { | 230 const ProtocolHandler& pending_protocol_handler() const { |
| 233 return pending_protocol_handler_; | 231 return pending_protocol_handler_; |
| 234 } | 232 } |
| 235 | 233 |
| 236 void ClearPendingProtocolHandler() { | 234 void ClearPendingProtocolHandler() { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 int64 frame_id, | 288 int64 frame_id, |
| 291 int64 parent_frame_id, | 289 int64 parent_frame_id, |
| 292 bool is_main_frame, | 290 bool is_main_frame, |
| 293 const GURL& validated_url, | 291 const GURL& validated_url, |
| 294 bool is_error_page, | 292 bool is_error_page, |
| 295 bool is_iframe_srcdoc, | 293 bool is_iframe_srcdoc, |
| 296 content::RenderViewHost* render_view_host) OVERRIDE; | 294 content::RenderViewHost* render_view_host) OVERRIDE; |
| 297 virtual void AppCacheAccessed(const GURL& manifest_url, | 295 virtual void AppCacheAccessed(const GURL& manifest_url, |
| 298 bool blocked_by_policy) OVERRIDE; | 296 bool blocked_by_policy) OVERRIDE; |
| 299 | 297 |
| 298 // If user clicks on 'save password' this will trigger the password saving |
| 299 // mechanism. |
| 300 bool PasswordAccepted(); |
| 301 |
| 302 // If user clicks on 'never save password for this site' this will trigger |
| 303 // the password blacklist mechanism. |
| 304 bool PasswordFormBlacklisted(); |
| 305 |
| 300 // Message handlers. Public for testing. | 306 // Message handlers. Public for testing. |
| 301 void OnContentBlocked(ContentSettingsType type, | 307 void OnContentBlocked(ContentSettingsType type, |
| 302 const std::string& resource_identifier); | 308 const std::string& resource_identifier); |
| 303 void OnContentAllowed(ContentSettingsType type); | 309 void OnContentAllowed(ContentSettingsType type); |
| 304 | 310 |
| 305 // These methods are invoked on the UI thread by the static functions above. | 311 // These methods are invoked on the UI thread by the static functions above. |
| 306 // Public for testing. | 312 // Public for testing. |
| 307 void OnCookiesRead(const GURL& url, | 313 void OnCookiesRead(const GURL& url, |
| 308 const GURL& first_party_url, | 314 const GURL& first_party_url, |
| 309 const net::CookieList& cookie_list, | 315 const net::CookieList& cookie_list, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 329 bool allowed); | 335 bool allowed); |
| 330 | 336 |
| 331 // This method is called to update the status about the microphone and | 337 // This method is called to update the status about the microphone and |
| 332 // camera stream access. |request_permissions| contains a list of requested | 338 // camera stream access. |request_permissions| contains a list of requested |
| 333 // media stream types and the permission for each type. | 339 // media stream types and the permission for each type. |
| 334 void OnMediaStreamPermissionSet( | 340 void OnMediaStreamPermissionSet( |
| 335 const GURL& request_origin, | 341 const GURL& request_origin, |
| 336 const MediaStreamDevicesController::MediaStreamTypePermissionMap& | 342 const MediaStreamDevicesController::MediaStreamTypePermissionMap& |
| 337 request_permissions); | 343 request_permissions); |
| 338 | 344 |
| 345 // This method is called to pass the |form_to_save| on a successful password |
| 346 // submission. It also updates the status of the save password content |
| 347 // setting. |
| 348 void OnPasswordSubmitted(PasswordFormManager* form_to_save); |
| 349 |
| 339 // There methods are called to update the status about MIDI access. | 350 // There methods are called to update the status about MIDI access. |
| 340 void OnMIDISysExAccessed(const GURL& reqesting_origin); | 351 void OnMIDISysExAccessed(const GURL& reqesting_origin); |
| 341 void OnMIDISysExAccessBlocked(const GURL& requesting_origin); | 352 void OnMIDISysExAccessBlocked(const GURL& requesting_origin); |
| 342 | 353 |
| 343 // Adds the given |SiteDataObserver|. The |observer| is notified when a | 354 // Adds the given |SiteDataObserver|. The |observer| is notified when a |
| 344 // locale shared object, like for example a cookie, is accessed. | 355 // locale shared object, like for example a cookie, is accessed. |
| 345 void AddSiteDataObserver(SiteDataObserver* observer); | 356 void AddSiteDataObserver(SiteDataObserver* observer); |
| 346 | 357 |
| 347 // Removes the given |SiteDataObserver|. | 358 // Removes the given |SiteDataObserver|. |
| 348 void RemoveSiteDataObserver(SiteDataObserver* observer); | 359 void RemoveSiteDataObserver(SiteDataObserver* observer); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 // Stores whether the user can load blocked plugins on this page. | 421 // Stores whether the user can load blocked plugins on this page. |
| 411 bool load_plugins_link_enabled_; | 422 bool load_plugins_link_enabled_; |
| 412 | 423 |
| 413 content::NotificationRegistrar registrar_; | 424 content::NotificationRegistrar registrar_; |
| 414 | 425 |
| 415 // The origin of the media stream request. Note that we only support handling | 426 // The origin of the media stream request. Note that we only support handling |
| 416 // settings for one request per tab. The latest request's origin will be | 427 // settings for one request per tab. The latest request's origin will be |
| 417 // stored here. http://crbug.com/259794 | 428 // stored here. http://crbug.com/259794 |
| 418 GURL media_stream_access_origin_; | 429 GURL media_stream_access_origin_; |
| 419 | 430 |
| 431 // The PasswordFormManager managing the form we're asking the user about, |
| 432 // and should update as per the decision. |
| 433 scoped_ptr<PasswordFormManager> form_to_save_; |
| 434 |
| 420 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 435 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
| 421 }; | 436 }; |
| 422 | 437 |
| 423 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 438 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| OLD | NEW |