| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "net/cookies/canonical_cookie.h" | 12 #include "net/cookies/canonical_cookie.h" |
| 13 | 13 |
| 14 class GURL; | 14 class GURL; |
| 15 class LocalSharedObjectsCounter; | 15 class LocalSharedObjectsCounter; |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 class CookieOptions; | 18 class CookieOptions; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace content_settings { | 21 namespace content_settings { |
| 22 | 22 |
| 23 // An abstraction of operations that depend on the embedder (e.g. Chrome). | 23 // An abstraction of operations that depend on the embedder (e.g. Chrome). |
| 24 // For mock / testing implementation in tests you can inherit from | |
| 25 // StubContentSettingsClient instead to avoid the need to stub unneeded pure | |
| 26 // virtual methods. | |
| 27 class ContentSettingsClient { | 24 class ContentSettingsClient { |
| 28 public: | 25 public: |
| 29 enum AccessType { BLOCKED, ALLOWED }; | 26 enum AccessType { BLOCKED, ALLOWED }; |
| 30 | 27 |
| 31 ContentSettingsClient() {} | 28 ContentSettingsClient() {} |
| 32 virtual ~ContentSettingsClient() {} | 29 virtual ~ContentSettingsClient() {} |
| 33 | 30 |
| 34 // Methods to notify the client about access to local shared objects. | 31 // Methods to notify the client about access to local shared objects. |
| 35 virtual void OnCookiesRead(const GURL& url, | 32 virtual void OnCookiesRead(const GURL& url, |
| 36 const GURL& first_party_url, | 33 const GURL& first_party_url, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 64 virtual const LocalSharedObjectsCounter& local_shared_objects( | 61 virtual const LocalSharedObjectsCounter& local_shared_objects( |
| 65 AccessType type) const = 0; | 62 AccessType type) const = 0; |
| 66 | 63 |
| 67 private: | 64 private: |
| 68 DISALLOW_COPY_AND_ASSIGN(ContentSettingsClient); | 65 DISALLOW_COPY_AND_ASSIGN(ContentSettingsClient); |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 } // namespace content_settings | 68 } // namespace content_settings |
| 72 | 69 |
| 73 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_ | 70 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_ |
| OLD | NEW |