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

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

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove obsolete special cases from ExtensionPermissionSet Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 bool IsOtherExtensionWithWebRequestInstalled() const { 102 bool IsOtherExtensionWithWebRequestInstalled() const {
103 return webrequest_other_; 103 return webrequest_other_;
104 } 104 }
105 105
106 void OnExtensionResponse(int request_id, 106 void OnExtensionResponse(int request_id,
107 bool success, 107 bool success,
108 const std::string& response, 108 const std::string& response,
109 const std::string& error); 109 const std::string& error);
110 110
111 // Checks that the current context contains an extension that has permission
112 // to execute the specified function. If it does not, a v8 exception is thrown
113 // and the method returns false. Otherwise returns true.
114 bool CheckCurrentContextAccessToExtensionAPI(
115 const std::string& function_name) const;
116
117 private: 111 private:
118 friend class RenderViewTest; 112 friend class RenderViewTest;
119 typedef void (*BindingInstaller)(ModuleSystem* module_system, 113 typedef void (*BindingInstaller)(ModuleSystem* module_system,
120 v8::Handle<v8::Object> chrome, 114 v8::Handle<v8::Object> chrome,
121 v8::Handle<v8::Object> chrome_hidden); 115 v8::Handle<v8::Object> chrome_hidden);
122 116
123 // RenderProcessObserver implementation: 117 // RenderProcessObserver implementation:
124 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; 118 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
125 virtual void WebKitInitialized() OVERRIDE; 119 virtual void WebKitInitialized() OVERRIDE;
126 virtual void IdleNotification() OVERRIDE; 120 virtual void IdleNotification() OVERRIDE;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // them. 233 // them.
240 std::map<std::string, BindingInstaller> lazy_bindings_map_; 234 std::map<std::string, BindingInstaller> lazy_bindings_map_;
241 235
242 // Sends API requests to the extension host. 236 // Sends API requests to the extension host.
243 scoped_ptr<ExtensionRequestSender> request_sender_; 237 scoped_ptr<ExtensionRequestSender> request_sender_;
244 238
245 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); 239 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher);
246 }; 240 };
247 241
248 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ 242 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698