OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "extensions/browser/api/storage/settings_namespace.h" | 11 #include "extensions/browser/api/storage/settings_namespace.h" |
12 | 12 |
| 13 class GURL; |
| 14 |
13 template <class T> | 15 template <class T> |
14 class ObserverListThreadSafe; | 16 class ObserverListThreadSafe; |
15 | 17 |
16 namespace content { | 18 namespace content { |
17 class BrowserContext; | 19 class BrowserContext; |
18 } | 20 } |
19 | 21 |
20 namespace extensions { | 22 namespace extensions { |
21 | 23 |
22 class SettingsObserver; | 24 class SettingsObserver; |
(...skipping 17 matching lines...) Expand all Loading... |
40 // Storage API support. | 42 // Storage API support. |
41 | 43 |
42 // Add any additional value store caches (e.g. for chrome.storage.managed) | 44 // Add any additional value store caches (e.g. for chrome.storage.managed) |
43 // to |caches|. By default adds nothing. | 45 // to |caches|. By default adds nothing. |
44 virtual void AddAdditionalValueStoreCaches( | 46 virtual void AddAdditionalValueStoreCaches( |
45 content::BrowserContext* context, | 47 content::BrowserContext* context, |
46 const scoped_refptr<SettingsStorageFactory>& factory, | 48 const scoped_refptr<SettingsStorageFactory>& factory, |
47 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 49 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
48 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); | 50 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); |
49 | 51 |
| 52 // Attaches a frame |url| inside the <appview> specified by |
| 53 // |guest_instance_id|. Returns true if the operation completes succcessfully. |
| 54 virtual bool AppViewInternalAttachFrame( |
| 55 content::BrowserContext* browser_context, |
| 56 const GURL& url, |
| 57 int guest_instance_id, |
| 58 const std::string& guest_extension_id); |
| 59 |
| 60 // Denies the embedding requested by the <appview> specified by |
| 61 // |guest_instance_id|. Returns true if the operation completes successfully. |
| 62 virtual bool AppViewInternalDenyRequest( |
| 63 content::BrowserContext* browser_context, |
| 64 int guest_instance_id, |
| 65 const std::string& guest_extension_id); |
| 66 |
50 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 67 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
51 // should be split into one interface per API. | 68 // should be split into one interface per API. |
52 }; | 69 }; |
53 | 70 |
54 } // namespace extensions | 71 } // namespace extensions |
55 | 72 |
56 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 73 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
OLD | NEW |