| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 void set_load_plugins_link_enabled(bool enabled) { | 296 void set_load_plugins_link_enabled(bool enabled) { |
| 297 load_plugins_link_enabled_ = enabled; | 297 load_plugins_link_enabled_ = enabled; |
| 298 } | 298 } |
| 299 | 299 |
| 300 // Called to indicate whether access to the Pepper broker was allowed or | 300 // Called to indicate whether access to the Pepper broker was allowed or |
| 301 // blocked. | 301 // blocked. |
| 302 void SetPepperBrokerAllowed(bool allowed); | 302 void SetPepperBrokerAllowed(bool allowed); |
| 303 | 303 |
| 304 // content::WebContentsObserver overrides. | 304 // content::WebContentsObserver overrides. |
| 305 virtual void RenderFrameForInterstitialPageCreated( | 305 virtual void RenderFrameForInterstitialPageCreated( |
| 306 content::RenderFrameHost* render_frame_host) OVERRIDE; | 306 content::RenderFrameHost* render_frame_host) override; |
| 307 virtual bool OnMessageReceived( | 307 virtual bool OnMessageReceived( |
| 308 const IPC::Message& message, | 308 const IPC::Message& message, |
| 309 content::RenderFrameHost* render_frame_host) OVERRIDE; | 309 content::RenderFrameHost* render_frame_host) override; |
| 310 virtual void DidNavigateMainFrame( | 310 virtual void DidNavigateMainFrame( |
| 311 const content::LoadCommittedDetails& details, | 311 const content::LoadCommittedDetails& details, |
| 312 const content::FrameNavigateParams& params) OVERRIDE; | 312 const content::FrameNavigateParams& params) override; |
| 313 virtual void DidStartProvisionalLoadForFrame( | 313 virtual void DidStartProvisionalLoadForFrame( |
| 314 content::RenderFrameHost* render_frame_host, | 314 content::RenderFrameHost* render_frame_host, |
| 315 const GURL& validated_url, | 315 const GURL& validated_url, |
| 316 bool is_error_page, | 316 bool is_error_page, |
| 317 bool is_iframe_srcdoc) OVERRIDE; | 317 bool is_iframe_srcdoc) override; |
| 318 virtual void AppCacheAccessed(const GURL& manifest_url, | 318 virtual void AppCacheAccessed(const GURL& manifest_url, |
| 319 bool blocked_by_policy) OVERRIDE; | 319 bool blocked_by_policy) override; |
| 320 | 320 |
| 321 // Message handlers. Public for testing. | 321 // Message handlers. Public for testing. |
| 322 void OnContentBlocked(ContentSettingsType type); | 322 void OnContentBlocked(ContentSettingsType type); |
| 323 void OnContentAllowed(ContentSettingsType type); | 323 void OnContentAllowed(ContentSettingsType type); |
| 324 | 324 |
| 325 // These methods are invoked on the UI thread by the static functions above. | 325 // These methods are invoked on the UI thread by the static functions above. |
| 326 // Public for testing. | 326 // Public for testing. |
| 327 void OnCookiesRead(const GURL& url, | 327 void OnCookiesRead(const GURL& url, |
| 328 const GURL& first_party_url, | 328 const GURL& first_party_url, |
| 329 const net::CookieList& cookie_list, | 329 const net::CookieList& cookie_list, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 private: | 374 private: |
| 375 explicit TabSpecificContentSettings(content::WebContents* tab); | 375 explicit TabSpecificContentSettings(content::WebContents* tab); |
| 376 friend class content::WebContentsUserData<TabSpecificContentSettings>; | 376 friend class content::WebContentsUserData<TabSpecificContentSettings>; |
| 377 | 377 |
| 378 // content_settings::Observer implementation. | 378 // content_settings::Observer implementation. |
| 379 virtual void OnContentSettingChanged( | 379 virtual void OnContentSettingChanged( |
| 380 const ContentSettingsPattern& primary_pattern, | 380 const ContentSettingsPattern& primary_pattern, |
| 381 const ContentSettingsPattern& secondary_pattern, | 381 const ContentSettingsPattern& secondary_pattern, |
| 382 ContentSettingsType content_type, | 382 ContentSettingsType content_type, |
| 383 std::string resource_identifier) OVERRIDE; | 383 std::string resource_identifier) override; |
| 384 | 384 |
| 385 // Notifies all registered |SiteDataObserver|s. | 385 // Notifies all registered |SiteDataObserver|s. |
| 386 void NotifySiteDataObservers(); | 386 void NotifySiteDataObservers(); |
| 387 | 387 |
| 388 // All currently registered |SiteDataObserver|s. | 388 // All currently registered |SiteDataObserver|s. |
| 389 ObserverList<SiteDataObserver> observer_list_; | 389 ObserverList<SiteDataObserver> observer_list_; |
| 390 | 390 |
| 391 // Stores which content setting types actually have blocked content. | 391 // Stores which content setting types actually have blocked content. |
| 392 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; | 392 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; |
| 393 | 393 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 std::string media_stream_requested_audio_device_; | 445 std::string media_stream_requested_audio_device_; |
| 446 std::string media_stream_requested_video_device_; | 446 std::string media_stream_requested_video_device_; |
| 447 | 447 |
| 448 // Observer to watch for content settings changed. | 448 // Observer to watch for content settings changed. |
| 449 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 449 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
| 450 | 450 |
| 451 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 451 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 454 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| OLD | NEW |