Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / components / content_settings / core / browser / content_settings_client.h
blobe6f4a4e0109b8507567866933f178c503568487b
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/strings/string16.h"
12 #include "net/cookies/canonical_cookie.h"
14 class GURL;
15 class LocalSharedObjectsCounter;
17 namespace net {
18 class CookieOptions;
21 namespace content_settings {
23 // An abstraction of operations that depend on the embedder (e.g. Chrome).
24 class ContentSettingsClient {
25 public:
26 enum AccessType { BLOCKED, ALLOWED };
28 ContentSettingsClient() {}
29 virtual ~ContentSettingsClient() {}
31 // Methods to notify the client about access to local shared objects.
32 virtual void OnCookiesRead(const GURL& url,
33 const GURL& first_party_url,
34 const net::CookieList& cookie_list,
35 bool blocked_by_policy) = 0;
37 virtual void OnCookieChanged(const GURL& url,
38 const GURL& first_party_url,
39 const std::string& cookie_line,
40 const net::CookieOptions& options,
41 bool blocked_by_policy) = 0;
43 virtual void OnFileSystemAccessed(const GURL& url,
44 bool blocked_by_policy) = 0;
46 virtual void OnIndexedDBAccessed(const GURL& url,
47 const base::string16& description,
48 bool blocked_by_policy) = 0;
50 virtual void OnLocalStorageAccessed(const GURL& url,
51 bool local,
52 bool blocked_by_policy) = 0;
54 virtual void OnWebDatabaseAccessed(const GURL& url,
55 const base::string16& name,
56 const base::string16& display_name,
57 bool blocked_by_policy) = 0;
59 // Returns the |LocalSharedObjectsCounter| instances corresponding to all
60 // allowed (or blocked, depending on |type|) local shared objects.
61 virtual const LocalSharedObjectsCounter& local_shared_objects(
62 AccessType type) const = 0;
64 private:
65 DISALLOW_COPY_AND_ASSIGN(ContentSettingsClient);
68 } // namespace content_settings
70 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_CLIENT_H_