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

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: rename resources 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 29 matching lines...) Expand all
40 const std::string& extension_id, int mouse_button) { 40 const std::string& extension_id, int mouse_button) {
41 ExtensionService* service = GetExtensionService(); 41 ExtensionService* service = GetExtensionService();
42 if (!service) 42 if (!service)
43 return ACTION_NONE; 43 return ACTION_NONE;
44 44
45 const Extension* extension = service->extensions()->GetByID(extension_id); 45 const Extension* extension = service->extensions()->GetByID(extension_id);
46 CHECK(extension); 46 CHECK(extension);
47 47
48 switch (mouse_button) { 48 switch (mouse_button) {
49 case 1: // left 49 case 1: // left
50 return ACTION_SHOW_SCRIPT_POPUP;
50 case 2: // middle 51 case 2: // middle
51 // TODO(kalman): decide what to do here. 52 // TODO(kalman): decide what to do here.
52 return ACTION_NONE; 53 return ACTION_NONE;
53 case 3: // right 54 case 3: // right
54 return extension->ShowConfigureContextMenus() ? 55 return extension->ShowConfigureContextMenus() ?
55 ACTION_SHOW_CONTEXT_MENU : ACTION_NONE; 56 ACTION_SHOW_CONTEXT_MENU : ACTION_NONE;
56 } 57 }
57 58
58 return ACTION_NONE; 59 return ACTION_NONE;
59 } 60 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 current_actions_.erase(it); 189 current_actions_.erase(it);
189 break; 190 break;
190 } 191 }
191 } 192 }
192 193
193 CHECK_EQ(size_before, current_actions_.size() + 1); 194 CHECK_EQ(size_before, current_actions_.size() + 1);
194 return true; 195 return true;
195 } 196 }
196 197
197 } // namespace extensions 198 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698