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

Side by Side Diff: chrome/renderer/extensions/extension_dispatcher.h

Issue 7508029: Add origin permissions to the extension permissions API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix dcheck Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const GURL& event_url); 71 const GURL& event_url);
72 void OnSetFunctionNames(const std::vector<std::string>& names); 72 void OnSetFunctionNames(const std::vector<std::string>& names);
73 void OnLoaded(const ExtensionMsg_Loaded_Params& params); 73 void OnLoaded(const ExtensionMsg_Loaded_Params& params);
74 void OnUnloaded(const std::string& id); 74 void OnUnloaded(const std::string& id);
75 void OnSetScriptingWhitelist( 75 void OnSetScriptingWhitelist(
76 const Extension::ScriptingWhitelist& extension_ids); 76 const Extension::ScriptingWhitelist& extension_ids);
77 void OnPageActionsUpdated(const std::string& extension_id, 77 void OnPageActionsUpdated(const std::string& extension_id,
78 const std::vector<std::string>& page_actions); 78 const std::vector<std::string>& page_actions);
79 void OnActivateApplication(const std::string& extension_id); 79 void OnActivateApplication(const std::string& extension_id);
80 void OnActivateExtension(const std::string& extension_id); 80 void OnActivateExtension(const std::string& extension_id);
81 void OnUpdatePermissions(const std::string& extension_id, 81 void OnUpdatePermissions(int reason_id,
82 const std::string& extension_id,
82 const ExtensionAPIPermissionSet& apis, 83 const ExtensionAPIPermissionSet& apis,
83 const URLPatternSet& explicit_hosts, 84 const URLPatternSet& explicit_hosts,
84 const URLPatternSet& scriptable_hosts); 85 const URLPatternSet& scriptable_hosts);
85 void OnUpdateUserScripts(base::SharedMemoryHandle table); 86 void OnUpdateUserScripts(base::SharedMemoryHandle table);
86 87
87 // Update the list of active extensions that will be reported when we crash. 88 // Update the list of active extensions that will be reported when we crash.
88 void UpdateActiveExtensions(); 89 void UpdateActiveExtensions();
89 90
90 // Calls RenderThread's RegisterExtension and keeps tracks of which v8 91 // Calls RenderThread's RegisterExtension and keeps tracks of which v8
91 // extension is for Chrome Extensions only. 92 // extension is for Chrome Extensions only.
92 void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions); 93 void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions);
93 94
94 // Sets up the host permissions for |extension|. 95 // Sets up the host permissions for |extension|.
95 void InitHostPermissions(const Extension* extension); 96 void InitOriginPermissions(const Extension* extension);
97 void UpdateOriginPermissions(UpdatedExtensionPermissionsInfo::Reason reason,
98 const Extension* extension,
99 const URLPatternSet& origins);
96 100
97 // True if this renderer is running extensions. 101 // True if this renderer is running extensions.
98 bool is_extension_process_; 102 bool is_extension_process_;
99 103
100 // Contains all loaded extensions. This is essentially the renderer 104 // Contains all loaded extensions. This is essentially the renderer
101 // counterpart to ExtensionService in the browser. It contains information 105 // counterpart to ExtensionService in the browser. It contains information
102 // about all extensions currently loaded by the browser. 106 // about all extensions currently loaded by the browser.
103 ExtensionSet extensions_; 107 ExtensionSet extensions_;
104 108
105 scoped_ptr<UserScriptSlave> user_script_slave_; 109 scoped_ptr<UserScriptSlave> user_script_slave_;
(...skipping 14 matching lines...) Expand all
120 // The applications that are active in this process. 124 // The applications that are active in this process.
121 std::set<std::string> active_application_ids_; 125 std::set<std::string> active_application_ids_;
122 126
123 // True once WebKit has been initialized (and it is therefore safe to poke). 127 // True once WebKit has been initialized (and it is therefore safe to poke).
124 bool is_webkit_initialized_; 128 bool is_webkit_initialized_;
125 129
126 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); 130 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher);
127 }; 131 };
128 132
129 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ 133 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/extension_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698