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

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

Issue 7432006: Add an experimental permissions API for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 9 years, 5 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/shared_memory.h" 13 #include "base/shared_memory.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "content/renderer/render_process_observer.h" 15 #include "content/renderer/render_process_observer.h"
16 #include "chrome/common/extensions/extension_set.h" 16 #include "chrome/common/extensions/extension_set.h"
17 17
18 class GURL; 18 class GURL;
19 class RenderThread; 19 class RenderThread;
20 class URLPattern; 20 class URLPattern;
21 class UserScriptSlave; 21 class UserScriptSlave;
22 struct ExtensionMsg_Loaded_Params; 22 struct ExtensionMsg_Loaded_Params;
23 struct ExtensionMsg_UpdatePermissions_Params;
23 24
24 namespace base { 25 namespace base {
25 class ListValue; 26 class ListValue;
26 } 27 }
27 28
28 namespace WebKit { 29 namespace WebKit {
29 class WebFrame; 30 class WebFrame;
30 } 31 }
31 32
32 namespace v8 { 33 namespace v8 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const GURL& event_url); 71 const GURL& event_url);
71 void OnSetFunctionNames(const std::vector<std::string>& names); 72 void OnSetFunctionNames(const std::vector<std::string>& names);
72 void OnLoaded(const ExtensionMsg_Loaded_Params& params); 73 void OnLoaded(const ExtensionMsg_Loaded_Params& params);
73 void OnUnloaded(const std::string& id); 74 void OnUnloaded(const std::string& id);
74 void OnSetScriptingWhitelist( 75 void OnSetScriptingWhitelist(
75 const Extension::ScriptingWhitelist& extension_ids); 76 const Extension::ScriptingWhitelist& extension_ids);
76 void OnPageActionsUpdated(const std::string& extension_id, 77 void OnPageActionsUpdated(const std::string& extension_id,
77 const std::vector<std::string>& page_actions); 78 const std::vector<std::string>& page_actions);
78 void OnActivateApplication(const std::string& extension_id); 79 void OnActivateApplication(const std::string& extension_id);
79 void OnActivateExtension(const std::string& extension_id); 80 void OnActivateExtension(const std::string& extension_id);
81 void OnUpdatePermissions(const std::string& extension_id,
82 const ExtensionAPIPermissionSet& apis,
83 const URLPatternSet& explicit_hosts,
84 const URLPatternSet& scriptable_hosts);
80 void OnUpdateUserScripts(base::SharedMemoryHandle table); 85 void OnUpdateUserScripts(base::SharedMemoryHandle table);
81 86
82 // Update the list of active extensions that will be reported when we crash. 87 // Update the list of active extensions that will be reported when we crash.
83 void UpdateActiveExtensions(); 88 void UpdateActiveExtensions();
84 89
85 // Calls RenderThread's RegisterExtension and keeps tracks of which v8 90 // Calls RenderThread's RegisterExtension and keeps tracks of which v8
86 // extension is for Chrome Extensions only. 91 // extension is for Chrome Extensions only.
87 void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions); 92 void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions);
88 93
89 // Sets up the host permissions for |extension|. 94 // Sets up the host permissions for |extension|.
(...skipping 25 matching lines...) Expand all
115 // The applications that are active in this process. 120 // The applications that are active in this process.
116 std::set<std::string> active_application_ids_; 121 std::set<std::string> active_application_ids_;
117 122
118 // True once WebKit has been initialized (and it is therefore safe to poke). 123 // True once WebKit has been initialized (and it is therefore safe to poke).
119 bool is_webkit_initialized_; 124 bool is_webkit_initialized_;
120 125
121 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); 126 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher);
122 }; 127 };
123 128
124 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ 129 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/url_pattern_set_unittest.cc ('k') | chrome/renderer/extensions/extension_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698