Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 
| 7 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 class Point; | 64 class Point; | 
| 65 class Rect; | 65 class Rect; | 
| 66 class Size; | 66 class Size; | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 namespace IPC { | 69 namespace IPC { | 
| 70 class Message; | 70 class Message; | 
| 71 } | 71 } | 
| 72 | 72 | 
| 73 namespace net { | 73 namespace net { | 
| 74 class CookieList; | |
| 74 class CookieOptions; | 75 class CookieOptions; | 
| 75 } | 76 } | 
| 76 | 77 | 
| 77 namespace webkit_glue { | 78 namespace webkit_glue { | 
| 78 struct FormData; | 79 struct FormData; | 
| 79 class FormField; | 80 class FormField; | 
| 80 struct PasswordForm; | 81 struct PasswordForm; | 
| 81 } | 82 } | 
| 82 | 83 | 
| 83 // | 84 // | 
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 // ContentSettings------------------------------------------------------------ | 389 // ContentSettings------------------------------------------------------------ | 
| 389 // Interface for content settings related events. | 390 // Interface for content settings related events. | 
| 390 | 391 | 
| 391 class ContentSettings { | 392 class ContentSettings { | 
| 392 public: | 393 public: | 
| 393 // Called when content in the current page was blocked due to the user's | 394 // Called when content in the current page was blocked due to the user's | 
| 394 // content settings. | 395 // content settings. | 
| 395 virtual void OnContentBlocked(ContentSettingsType type, | 396 virtual void OnContentBlocked(ContentSettingsType type, | 
| 396 const std::string& resource_identifier) = 0; | 397 const std::string& resource_identifier) = 0; | 
| 397 | 398 | 
| 398 // Called when a specific cookie in the current page was accessed. | 399 // Called when cookies for given URL were read either from within the | 
| 
 
darin (slow to review)
2010/12/06 22:55:03
nit: "for given URL" -> "for the given URL"
 
 | |
| 400 // current page or while loading it. |blocked_by_policy| should be true, if | |
| 401 // reading cookies was blocked due to the user's content settings. In that | |
| 402 // case, this function should invoke OnContentBlocked. | |
| 403 virtual void OnCookiesRead( | |
| 404 const GURL& url, | |
| 405 const net::CookieList& cookie_list, | |
| 406 bool blocked_by_policy) = 0; | |
| 407 | |
| 408 // Called when a specific cookie in the current page was changed. | |
| 399 // |blocked_by_policy| should be true, if the cookie was blocked due to the | 409 // |blocked_by_policy| should be true, if the cookie was blocked due to the | 
| 400 // user's content settings. In that case, this function should invoke | 410 // user's content settings. In that case, this function should invoke | 
| 401 // OnContentBlocked. | 411 // OnContentBlocked. | 
| 402 virtual void OnCookieAccessed(const GURL& url, | 412 virtual void OnCookieChanged(const GURL& url, | 
| 403 const std::string& cookie_line, | 413 const std::string& cookie_line, | 
| 404 const net::CookieOptions& options, | 414 const net::CookieOptions& options, | 
| 405 bool blocked_by_policy) = 0; | 415 bool blocked_by_policy) = 0; | 
| 406 | 416 | 
| 407 // Called when a specific indexed db factory in the current page was | 417 // Called when a specific indexed db factory in the current page was | 
| 408 // accessed. If access was blocked due to the user's content settings, | 418 // accessed. If access was blocked due to the user's content settings, | 
| 409 // |blocked_by_policy| should be true, and this function should invoke | 419 // |blocked_by_policy| should be true, and this function should invoke | 
| 410 // OnContentBlocked. | 420 // OnContentBlocked. | 
| 411 virtual void OnIndexedDBAccessed(const GURL& url, | 421 virtual void OnIndexedDBAccessed(const GURL& url, | 
| 412 const string16& description, | 422 const string16& description, | 
| 413 bool blocked_by_policy) = 0; | 423 bool blocked_by_policy) = 0; | 
| 414 | 424 | 
| 415 // Called when a specific local storage area in the current page was | 425 // Called when a specific local storage area in the current page was | 
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 863 bool remember) {} | 873 bool remember) {} | 
| 864 | 874 | 
| 865 // Update the content restrictions, i.e. disable print/copy. | 875 // Update the content restrictions, i.e. disable print/copy. | 
| 866 virtual void UpdateContentRestrictions(int restrictions) {} | 876 virtual void UpdateContentRestrictions(int restrictions) {} | 
| 867 | 877 | 
| 868 protected: | 878 protected: | 
| 869 virtual ~RenderViewHostDelegate() {} | 879 virtual ~RenderViewHostDelegate() {} | 
| 870 }; | 880 }; | 
| 871 | 881 | 
| 872 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 882 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 
| OLD | NEW |