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

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

Issue 256032: Add an API to manipulate the browser action badge. (Closed)
Patch Set: meet halfway Created 11 years, 2 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/process_util.h" 7 #include "base/process_util.h"
8 #include "base/singleton.h" 8 #include "base/singleton.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/execute_code_in_tab_function.h" 10 #include "chrome/browser/extensions/execute_code_in_tab_function.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 factories_[page_actions::kEnablePageActionFunction] = 123 factories_[page_actions::kEnablePageActionFunction] =
124 &NewExtensionFunction<EnablePageActionFunction>; 124 &NewExtensionFunction<EnablePageActionFunction>;
125 factories_[page_actions::kDisablePageActionFunction] = 125 factories_[page_actions::kDisablePageActionFunction] =
126 &NewExtensionFunction<DisablePageActionFunction>; 126 &NewExtensionFunction<DisablePageActionFunction>;
127 127
128 // Browser Actions. 128 // Browser Actions.
129 factories_[browser_actions::kSetNameFunction] = 129 factories_[browser_actions::kSetNameFunction] =
130 &NewExtensionFunction<BrowserActionSetNameFunction>; 130 &NewExtensionFunction<BrowserActionSetNameFunction>;
131 factories_[browser_actions::kSetIconFunction] = 131 factories_[browser_actions::kSetIconFunction] =
132 &NewExtensionFunction<BrowserActionSetIconFunction>; 132 &NewExtensionFunction<BrowserActionSetIconFunction>;
133 factories_[browser_actions::kSetBadgeTextFunction] =
134 &NewExtensionFunction<BrowserActionSetBadgeTextFunction>;
135 factories_[browser_actions::kSetBadgeBackgroundColorFunction] =
136 &NewExtensionFunction<BrowserActionSetBadgeBackgroundColorFunction>;
133 137
134 // Bookmarks. 138 // Bookmarks.
135 factories_[bookmarks::kGetBookmarksFunction] = 139 factories_[bookmarks::kGetBookmarksFunction] =
136 &NewExtensionFunction<GetBookmarksFunction>; 140 &NewExtensionFunction<GetBookmarksFunction>;
137 factories_[bookmarks::kGetBookmarkChildrenFunction] = 141 factories_[bookmarks::kGetBookmarkChildrenFunction] =
138 &NewExtensionFunction<GetBookmarkChildrenFunction>; 142 &NewExtensionFunction<GetBookmarkChildrenFunction>;
139 factories_[bookmarks::kGetBookmarkTreeFunction] = 143 factories_[bookmarks::kGetBookmarkTreeFunction] =
140 &NewExtensionFunction<GetBookmarkTreeFunction>; 144 &NewExtensionFunction<GetBookmarkTreeFunction>;
141 factories_[bookmarks::kSearchBookmarksFunction] = 145 factories_[bookmarks::kSearchBookmarksFunction] =
142 &NewExtensionFunction<SearchBookmarksFunction>; 146 &NewExtensionFunction<SearchBookmarksFunction>;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } else { 307 } else {
304 NOTREACHED(); 308 NOTREACHED();
305 base::KillProcess(render_view_host_->process()->process().handle(), 309 base::KillProcess(render_view_host_->process()->process().handle(),
306 ResultCodes::KILLED_BAD_MESSAGE, false); 310 ResultCodes::KILLED_BAD_MESSAGE, false);
307 } 311 }
308 } 312 }
309 313
310 Profile* ExtensionFunctionDispatcher::profile() { 314 Profile* ExtensionFunctionDispatcher::profile() {
311 return render_view_host_->process()->profile(); 315 return render_view_host_->process()->profile();
312 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browser_actions_api.cc ('k') | chrome/browser/views/browser_actions_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698