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

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

Issue 10565017: Parse the script_badge manifest section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back out support for setting switches in unittests. Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/script_badge_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_browser_event_router.h" 5 #include "chrome/browser/extensions/extension_browser_event_router.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/api/extension_action/extension_page_actions_ api_constants.h" 9 #include "chrome/browser/extensions/api/extension_action/extension_page_actions_ api_constants.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 const char* event_name = NULL; 682 const char* event_name = NULL;
683 switch (extension->declared_action_type()) { 683 switch (extension->declared_action_type()) {
684 case ExtensionAction::TYPE_NONE: 684 case ExtensionAction::TYPE_NONE:
685 break; 685 break;
686 case ExtensionAction::TYPE_BROWSER: 686 case ExtensionAction::TYPE_BROWSER:
687 event_name = "browserAction.onClicked"; 687 event_name = "browserAction.onClicked";
688 break; 688 break;
689 case ExtensionAction::TYPE_PAGE: 689 case ExtensionAction::TYPE_PAGE:
690 event_name = "pageAction.onClicked"; 690 event_name = "pageAction.onClicked";
691 break; 691 break;
692 case ExtensionAction::TYPE_SCRIPT_BADGE:
693 event_name = "scriptBadge.onClicked";
694 break;
692 } 695 }
693 696
694 if (event_name) { 697 if (event_name) {
695 DispatchEventWithTab(profile, 698 DispatchEventWithTab(profile,
696 extension_id, 699 extension_id,
697 event_name, 700 event_name,
698 tab_contents->web_contents(), 701 tab_contents->web_contents(),
699 true); 702 true);
700 } 703 }
701 } 704 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/script_badge_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698