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

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

Issue 10175008: Improving the process model extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to async extension functions and generated docs. 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 #include "chrome/browser/extensions/extension_function_registry.h" 5 #include "chrome/browser/extensions/extension_function_registry.h"
6 6
7 #include "chrome/browser/accessibility/accessibility_extension_api.h" 7 #include "chrome/browser/accessibility/accessibility_extension_api.h"
8 #include "chrome/browser/bookmarks/bookmark_extension_api.h" 8 #include "chrome/browser/bookmarks/bookmark_extension_api.h"
9 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h" 9 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h"
10 #include "chrome/browser/download/download_extension_api.h" 10 #include "chrome/browser/download/download_extension_api.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 RegisterFunction<SearchHistoryFunction>(); 191 RegisterFunction<SearchHistoryFunction>();
192 192
193 // Idle 193 // Idle
194 RegisterFunction<ExtensionIdleQueryStateFunction>(); 194 RegisterFunction<ExtensionIdleQueryStateFunction>();
195 195
196 // I18N. 196 // I18N.
197 RegisterFunction<GetAcceptLanguagesFunction>(); 197 RegisterFunction<GetAcceptLanguagesFunction>();
198 198
199 // Processes. 199 // Processes.
200 RegisterFunction<GetProcessIdForTabFunction>(); 200 RegisterFunction<GetProcessIdForTabFunction>();
201 RegisterFunction<TerminateFunction>();
202 RegisterFunction<GetProcessInfoFunction>();
201 203
202 // Metrics. 204 // Metrics.
203 RegisterFunction<MetricsRecordUserActionFunction>(); 205 RegisterFunction<MetricsRecordUserActionFunction>();
204 RegisterFunction<MetricsRecordValueFunction>(); 206 RegisterFunction<MetricsRecordValueFunction>();
205 RegisterFunction<MetricsRecordPercentageFunction>(); 207 RegisterFunction<MetricsRecordPercentageFunction>();
206 RegisterFunction<MetricsRecordCountFunction>(); 208 RegisterFunction<MetricsRecordCountFunction>();
207 RegisterFunction<MetricsRecordSmallCountFunction>(); 209 RegisterFunction<MetricsRecordSmallCountFunction>();
208 RegisterFunction<MetricsRecordMediumCountFunction>(); 210 RegisterFunction<MetricsRecordMediumCountFunction>();
209 RegisterFunction<MetricsRecordTimeFunction>(); 211 RegisterFunction<MetricsRecordTimeFunction>();
210 RegisterFunction<MetricsRecordMediumTimeFunction>(); 212 RegisterFunction<MetricsRecordMediumTimeFunction>();
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 536 }
535 537
536 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( 538 ExtensionFunction* ExtensionFunctionRegistry::NewFunction(
537 const std::string& name) { 539 const std::string& name) {
538 FactoryMap::iterator iter = factories_.find(name); 540 FactoryMap::iterator iter = factories_.find(name);
539 DCHECK(iter != factories_.end()); 541 DCHECK(iter != factories_.end());
540 ExtensionFunction* function = iter->second(); 542 ExtensionFunction* function = iter->second();
541 function->set_name(name); 543 function->set_name(name);
542 return function; 544 return function;
543 } 545 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698