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

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

Issue 10544195: Show an extension info bubble when a script badge is clicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase eh 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
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/script_badge_controller.h" 5 #include "chrome/browser/extensions/script_badge_controller.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 30 matching lines...) Expand all
41 const std::string& extension_id, int mouse_button) { 41 const std::string& extension_id, int mouse_button) {
42 ExtensionService* service = GetExtensionService(); 42 ExtensionService* service = GetExtensionService();
43 if (!service) 43 if (!service)
44 return ACTION_NONE; 44 return ACTION_NONE;
45 45
46 const Extension* extension = service->extensions()->GetByID(extension_id); 46 const Extension* extension = service->extensions()->GetByID(extension_id);
47 CHECK(extension); 47 CHECK(extension);
48 48
49 switch (mouse_button) { 49 switch (mouse_button) {
50 case 1: // left 50 case 1: // left
51 return ACTION_SHOW_SCRIPT_POPUP;
51 case 2: // middle 52 case 2: // middle
52 // TODO(kalman): decide what to do here. 53 // TODO(kalman): decide what to do here.
53 return ACTION_NONE; 54 return ACTION_NONE;
54 case 3: // right 55 case 3: // right
55 return extension->ShowConfigureContextMenus() ? 56 return extension->ShowConfigureContextMenus() ?
56 ACTION_SHOW_CONTEXT_MENU : ACTION_NONE; 57 ACTION_SHOW_CONTEXT_MENU : ACTION_NONE;
57 } 58 }
58 59
59 return ACTION_NONE; 60 return ACTION_NONE;
60 } 61 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 current_actions_.erase(it); 190 current_actions_.erase(it);
190 break; 191 break;
191 } 192 }
192 } 193 }
193 194
194 CHECK_EQ(size_before, current_actions_.size() + 1); 195 CHECK_EQ(size_before, current_actions_.size() + 1);
195 return true; 196 return true;
196 } 197 }
197 198
198 } // namespace extensions 199 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.h ('k') | chrome/browser/resources/extensions/extension_info.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698