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

Unified Diff: chrome/browser/extensions/menu_manager.cc

Issue 10832348: Tab value for context menu onclick event should be optional. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/menu_manager.cc
diff --git a/chrome/browser/extensions/menu_manager.cc b/chrome/browser/extensions/menu_manager.cc
index 657d32a2ca12a8007eeb41ad6be74e96fef2a85c..7bf47a13f222f64396862488a94556320a85586f 100644
--- a/chrome/browser/extensions/menu_manager.cc
+++ b/chrome/browser/extensions/menu_manager.cc
@@ -617,11 +617,14 @@ void MenuManager::ExecuteCommand(Profile* profile,
args->Append(properties);
// Add the tab info to the argument list.
+ // No tab info in a platform app
Mihai Parparita -not on Chrome 2012/08/16 19:52:42 Nit: Add period at the end of sentences.
// Note: web_contents only NULL in unit tests :(
Mihai Parparita -not on Chrome 2012/08/16 19:52:42 Nit: move this comment down one line to be just ab
- if (web_contents)
- args->Append(ExtensionTabUtil::CreateTabValue(web_contents));
- else
- args->Append(new DictionaryValue());
+ if (!extension || !extension->is_platform_app()) {
+ if (web_contents)
+ args->Append(ExtensionTabUtil::CreateTabValue(web_contents));
+ else
+ args->Append(new DictionaryValue());
+ }
if (item->type() == MenuItem::CHECKBOX ||
item->type() == MenuItem::RADIO) {

Powered by Google App Engine
This is Rietveld 408576698