Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: chrome/common/extensions/chrome_extensions_client.h

Issue 27446002: Move permission warning message handling from PermissionSet to PermissionMessageProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/chrome_extensions_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_
6 #define CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ 6 #define CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" 11 #include "chrome/common/extensions/permissions/chrome_api_permissions.h"
12 #include "chrome/common/extensions/permissions/chrome_permission_message_provide r.h"
12 #include "extensions/common/extensions_client.h" 13 #include "extensions/common/extensions_client.h"
13 #include "extensions/common/permissions/permissions_provider.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 // The implementation of ExtensionsClient for Chrome, which encapsulates the 17 // The implementation of ExtensionsClient for Chrome, which encapsulates the
18 // global knowledge of features, permissions, and manifest fields. 18 // global knowledge of features, permissions, and manifest fields.
19 class ChromeExtensionsClient : public ExtensionsClient { 19 class ChromeExtensionsClient : public ExtensionsClient {
20 public: 20 public:
21 ChromeExtensionsClient(); 21 ChromeExtensionsClient();
22 virtual ~ChromeExtensionsClient(); 22 virtual ~ChromeExtensionsClient();
23 23
24 virtual void Initialize() OVERRIDE;
25
24 virtual const PermissionsProvider& GetPermissionsProvider() const OVERRIDE; 26 virtual const PermissionsProvider& GetPermissionsProvider() const OVERRIDE;
25 virtual void RegisterManifestHandlers() const OVERRIDE; 27 virtual const PermissionMessageProvider& GetPermissionMessageProvider() const
28 OVERRIDE;
26 virtual FeatureProvider* GetFeatureProviderByName(const std::string& name) 29 virtual FeatureProvider* GetFeatureProviderByName(const std::string& name)
27 const OVERRIDE; 30 const OVERRIDE;
28 virtual void FilterHostPermissions( 31 virtual void FilterHostPermissions(
29 const URLPatternSet& hosts, 32 const URLPatternSet& hosts,
30 URLPatternSet* new_hosts, 33 URLPatternSet* new_hosts,
31 std::set<PermissionMessage>* messages) const OVERRIDE; 34 std::set<PermissionMessage>* messages) const OVERRIDE;
32 35
33 // Get the LazyInstance for ChromeExtensionsClient. 36 // Get the LazyInstance for ChromeExtensionsClient.
34 static ChromeExtensionsClient* GetInstance(); 37 static ChromeExtensionsClient* GetInstance();
35 38
36 private: 39 private:
37 const ChromeAPIPermissions chrome_api_permissions_; 40 const ChromeAPIPermissions chrome_api_permissions_;
41 const ChromePermissionMessageProvider permission_message_provider_;
38 42
39 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; 43 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>;
40 44
41 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); 45 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient);
42 }; 46 };
43 47
44 } // namespace extensions 48 } // namespace extensions
45 49
46 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ 50 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/chrome_extensions_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698