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

Side by Side Diff: chrome/browser/extensions/extension_function_dispatcher.cc

Issue 10119003: Pull shell window stuff out of ExtensionHost and put in ShellWindow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Try jobs Created 8 years, 7 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
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 #include "chrome/browser/extensions/extension_function_dispatcher.h" 5 #include "chrome/browser/extensions/extension_function_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 struct Static { 89 struct Static {
90 Static() 90 Static()
91 : api(extensions::ExtensionAPI::CreateWithDefaultConfiguration()) { 91 : api(extensions::ExtensionAPI::CreateWithDefaultConfiguration()) {
92 } 92 }
93 scoped_ptr<extensions::ExtensionAPI> api; 93 scoped_ptr<extensions::ExtensionAPI> api;
94 }; 94 };
95 base::LazyInstance<Static> g_global_io_data = LAZY_INSTANCE_INITIALIZER; 95 base::LazyInstance<Static> g_global_io_data = LAZY_INSTANCE_INITIALIZER;
96 96
97 } // namespace 97 } // namespace
98 98
99 Browser* ExtensionFunctionDispatcher::Delegate::GetBrowser() {
100 return NULL;
101 }
102
103 content::WebContents*
104 ExtensionFunctionDispatcher::Delegate::GetAssociatedWebContents() const {
105 return NULL;
106 }
99 107
100 void ExtensionFunctionDispatcher::GetAllFunctionNames( 108 void ExtensionFunctionDispatcher::GetAllFunctionNames(
101 std::vector<std::string>* names) { 109 std::vector<std::string>* names) {
102 ExtensionFunctionRegistry::GetInstance()->GetAllNames(names); 110 ExtensionFunctionRegistry::GetInstance()->GetAllNames(names);
103 } 111 }
104 112
105 bool ExtensionFunctionDispatcher::OverrideFunction( 113 bool ExtensionFunctionDispatcher::OverrideFunction(
106 const std::string& name, ExtensionFunctionFactory factory) { 114 const std::string& name, ExtensionFunctionFactory factory) {
107 return ExtensionFunctionRegistry::GetInstance()->OverrideFunction(name, 115 return ExtensionFunctionRegistry::GetInstance()->OverrideFunction(name,
108 factory); 116 factory);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 309 }
302 310
303 // static 311 // static
304 void ExtensionFunctionDispatcher::SendAccessDenied( 312 void ExtensionFunctionDispatcher::SendAccessDenied(
305 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { 313 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) {
306 ListValue empty_list; 314 ListValue empty_list;
307 ipc_sender->Send(new ExtensionMsg_Response( 315 ipc_sender->Send(new ExtensionMsg_Response(
308 routing_id, request_id, false, empty_list, 316 routing_id, request_id, false, empty_list,
309 "Access to extension API denied.")); 317 "Access to extension API denied."));
310 } 318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698