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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // blocked local shared objects like cookies, local storage, ... . | 222 // blocked local shared objects like cookies, local storage, ... . |
223 const LocalSharedObjectsContainer& blocked_local_shared_objects() const { | 223 const LocalSharedObjectsContainer& blocked_local_shared_objects() const { |
224 return blocked_local_shared_objects_; | 224 return blocked_local_shared_objects_; |
225 } | 225 } |
226 | 226 |
227 bool load_plugins_link_enabled() { return load_plugins_link_enabled_; } | 227 bool load_plugins_link_enabled() { return load_plugins_link_enabled_; } |
228 void set_load_plugins_link_enabled(bool enabled) { | 228 void set_load_plugins_link_enabled(bool enabled) { |
229 load_plugins_link_enabled_ = enabled; | 229 load_plugins_link_enabled_ = enabled; |
230 } | 230 } |
231 | 231 |
| 232 // Called to indicate whether access to the Pepper broker was allowed or |
| 233 // blocked. |
| 234 void SetPepperBrokerAllowed(bool allowed); |
| 235 |
232 // content::WebContentsObserver overrides. | 236 // content::WebContentsObserver overrides. |
233 virtual void RenderViewForInterstitialPageCreated( | 237 virtual void RenderViewForInterstitialPageCreated( |
234 content::RenderViewHost* render_view_host) OVERRIDE; | 238 content::RenderViewHost* render_view_host) OVERRIDE; |
235 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 239 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
236 virtual void DidNavigateMainFrame( | 240 virtual void DidNavigateMainFrame( |
237 const content::LoadCommittedDetails& details, | 241 const content::LoadCommittedDetails& details, |
238 const content::FrameNavigateParams& params) OVERRIDE; | 242 const content::FrameNavigateParams& params) OVERRIDE; |
239 virtual void DidStartProvisionalLoadForFrame( | 243 virtual void DidStartProvisionalLoadForFrame( |
240 int64 frame_id, | 244 int64 frame_id, |
241 int64 parent_frame_id, | 245 int64 parent_frame_id, |
242 bool is_main_frame, | 246 bool is_main_frame, |
243 const GURL& validated_url, | 247 const GURL& validated_url, |
244 bool is_error_page, | 248 bool is_error_page, |
245 bool is_iframe_srcdoc, | 249 bool is_iframe_srcdoc, |
246 content::RenderViewHost* render_view_host) OVERRIDE; | 250 content::RenderViewHost* render_view_host) OVERRIDE; |
247 virtual void AppCacheAccessed(const GURL& manifest_url, | 251 virtual void AppCacheAccessed(const GURL& manifest_url, |
248 bool blocked_by_policy) OVERRIDE; | 252 bool blocked_by_policy) OVERRIDE; |
249 | 253 |
250 // Message handlers. Public for testing. | 254 // Message handlers. Public for testing. |
251 void OnContentBlocked(ContentSettingsType type, | 255 void OnContentBlocked(ContentSettingsType type, |
252 const std::string& resource_identifier); | 256 const std::string& resource_identifier); |
| 257 void OnContentAccessed(ContentSettingsType type); |
253 | 258 |
254 // These methods are invoked on the UI thread by the static functions above. | 259 // These methods are invoked on the UI thread by the static functions above. |
255 // Public for testing. | 260 // Public for testing. |
256 void OnCookiesRead(const GURL& url, | 261 void OnCookiesRead(const GURL& url, |
257 const GURL& first_party_url, | 262 const GURL& first_party_url, |
258 const net::CookieList& cookie_list, | 263 const net::CookieList& cookie_list, |
259 bool blocked_by_policy); | 264 bool blocked_by_policy); |
260 void OnCookieChanged(const GURL& url, | 265 void OnCookieChanged(const GURL& url, |
261 const GURL& first_party_url, | 266 const GURL& first_party_url, |
262 const std::string& cookie_line, | 267 const std::string& cookie_line, |
(...skipping 24 matching lines...) Expand all Loading... |
287 // Removes the given |SiteDataObserver|. | 292 // Removes the given |SiteDataObserver|. |
288 void RemoveSiteDataObserver(SiteDataObserver* observer); | 293 void RemoveSiteDataObserver(SiteDataObserver* observer); |
289 | 294 |
290 private: | 295 private: |
291 explicit TabSpecificContentSettings(content::WebContents* tab); | 296 explicit TabSpecificContentSettings(content::WebContents* tab); |
292 friend class content::WebContentsUserData<TabSpecificContentSettings>; | 297 friend class content::WebContentsUserData<TabSpecificContentSettings>; |
293 | 298 |
294 void AddBlockedResource(ContentSettingsType content_type, | 299 void AddBlockedResource(ContentSettingsType content_type, |
295 const std::string& resource_identifier); | 300 const std::string& resource_identifier); |
296 | 301 |
297 void OnContentAccessed(ContentSettingsType type); | |
298 | |
299 // content::NotificationObserver implementation. | 302 // content::NotificationObserver implementation. |
300 virtual void Observe(int type, | 303 virtual void Observe(int type, |
301 const content::NotificationSource& source, | 304 const content::NotificationSource& source, |
302 const content::NotificationDetails& details) OVERRIDE; | 305 const content::NotificationDetails& details) OVERRIDE; |
303 | 306 |
304 // Notifies all registered |SiteDataObserver|s. | 307 // Notifies all registered |SiteDataObserver|s. |
305 void NotifySiteDataObservers(); | 308 void NotifySiteDataObservers(); |
306 | 309 |
307 // All currently registered |SiteDataObserver|s. | 310 // All currently registered |SiteDataObserver|s. |
308 ObserverList<SiteDataObserver> observer_list_; | 311 ObserverList<SiteDataObserver> observer_list_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 351 |
349 // Stores whether the user can load blocked plugins on this page. | 352 // Stores whether the user can load blocked plugins on this page. |
350 bool load_plugins_link_enabled_; | 353 bool load_plugins_link_enabled_; |
351 | 354 |
352 content::NotificationRegistrar registrar_; | 355 content::NotificationRegistrar registrar_; |
353 | 356 |
354 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 357 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
355 }; | 358 }; |
356 | 359 |
357 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 360 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
OLD | NEW |