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

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

Issue 10703111: Cleanup: make ExtensionRequestSender manage its IPC responses directly, rather (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert sceopd_observer change Created 8 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) 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool IsAdblockWithWebRequestInstalled() const { 102 bool IsAdblockWithWebRequestInstalled() const {
103 return webrequest_adblock_; 103 return webrequest_adblock_;
104 } 104 }
105 bool IsAdblockPlusWithWebRequestInstalled() const { 105 bool IsAdblockPlusWithWebRequestInstalled() const {
106 return webrequest_adblock_plus_; 106 return webrequest_adblock_plus_;
107 } 107 }
108 bool IsOtherExtensionWithWebRequestInstalled() const { 108 bool IsOtherExtensionWithWebRequestInstalled() const {
109 return webrequest_other_; 109 return webrequest_other_;
110 } 110 }
111 111
112 void OnExtensionResponse(int request_id,
113 bool success,
114 const base::ListValue& response,
115 const std::string& error);
116
117 // Checks that the current context contains an extension that has permission 112 // Checks that the current context contains an extension that has permission
118 // to execute the specified function. If it does not, a v8 exception is thrown 113 // to execute the specified function. If it does not, a v8 exception is thrown
119 // and the method returns false. Otherwise returns true. 114 // and the method returns false. Otherwise returns true.
120 bool CheckCurrentContextAccessToExtensionAPI( 115 bool CheckCurrentContextAccessToExtensionAPI(
121 const std::string& function_name) const; 116 const std::string& function_name) const;
122 117
123 private: 118 private:
124 friend class RenderViewTest; 119 friend class RenderViewTest;
125 typedef void (*BindingInstaller)(ModuleSystem* module_system, 120 typedef void (*BindingInstaller)(ModuleSystem* module_system,
126 v8::Handle<v8::Object> chrome, 121 v8::Handle<v8::Object> chrome,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 scoped_ptr<ExtensionRequestSender> request_sender_; 255 scoped_ptr<ExtensionRequestSender> request_sender_;
261 256
262 // The current channel. From VersionInfo::GetChannel(). 257 // The current channel. From VersionInfo::GetChannel().
263 // TODO(aa): Remove when we can restrict non-permission APIs to dev-only. 258 // TODO(aa): Remove when we can restrict non-permission APIs to dev-only.
264 int chrome_channel_; 259 int chrome_channel_;
265 260
266 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); 261 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher);
267 }; 262 };
268 263
269 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ 264 #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