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

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

Issue 100164: extensions api: windows.removeWindow(), events: onWindowCreated, onWindowRemoved (Closed)
Patch Set: touch grd to avoid clobber build Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/json_reader.h" 7 #include "base/json_reader.h"
8 #include "base/json_writer.h" 8 #include "base/json_writer.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 FactoryRegistry* FactoryRegistry::instance() { 46 FactoryRegistry* FactoryRegistry::instance() {
47 return Singleton<FactoryRegistry>::get(); 47 return Singleton<FactoryRegistry>::get();
48 } 48 }
49 49
50 FactoryRegistry::FactoryRegistry() { 50 FactoryRegistry::FactoryRegistry() {
51 // Register all functions here. 51 // Register all functions here.
52 52
53 // Tabs 53 // Tabs
54 factories_["GetWindows"] = &NewExtensionFunction<GetWindowsFunction>; 54 factories_["GetWindows"] = &NewExtensionFunction<GetWindowsFunction>;
55 factories_["CreateWindow"] = &NewExtensionFunction<CreateWindowFunction>; 55 factories_["CreateWindow"] = &NewExtensionFunction<CreateWindowFunction>;
56 factories_["RemoveWindow"] = &NewExtensionFunction<RemoveWindowFunction>;
56 factories_["GetTabsForWindow"] = 57 factories_["GetTabsForWindow"] =
57 &NewExtensionFunction<GetTabsForWindowFunction>; 58 &NewExtensionFunction<GetTabsForWindowFunction>;
58 factories_["GetTab"] = &NewExtensionFunction<GetTabFunction>; 59 factories_["GetTab"] = &NewExtensionFunction<GetTabFunction>;
59 factories_["CreateTab"] = &NewExtensionFunction<CreateTabFunction>; 60 factories_["CreateTab"] = &NewExtensionFunction<CreateTabFunction>;
60 factories_["UpdateTab"] = &NewExtensionFunction<UpdateTabFunction>; 61 factories_["UpdateTab"] = &NewExtensionFunction<UpdateTabFunction>;
61 factories_["MoveTab"] = &NewExtensionFunction<MoveTabFunction>; 62 factories_["MoveTab"] = &NewExtensionFunction<MoveTabFunction>;
62 factories_["RemoveTab"] = &NewExtensionFunction<RemoveTabFunction>; 63 factories_["RemoveTab"] = &NewExtensionFunction<RemoveTabFunction>;
63 64
64 // Bookmarks 65 // Bookmarks
65 factories_["GetBookmarks"] = &NewExtensionFunction<GetBookmarksFunction>; 66 factories_["GetBookmarks"] = &NewExtensionFunction<GetBookmarksFunction>;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } else { 155 } else {
155 NOTREACHED(); 156 NOTREACHED();
156 base::KillProcess(render_view_host_->process()->process().handle(), 157 base::KillProcess(render_view_host_->process()->process().handle(),
157 ResultCodes::KILLED_BAD_MESSAGE, false); 158 ResultCodes::KILLED_BAD_MESSAGE, false);
158 } 159 }
159 } 160 }
160 161
161 Profile* ExtensionFunctionDispatcher::profile() { 162 Profile* ExtensionFunctionDispatcher::profile() {
162 return render_view_host_->process()->profile(); 163 return render_view_host_->process()->profile();
163 } 164 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.cc ('k') | chrome/browser/extensions/extension_tabs_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698