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

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

Issue 1181263007: WebView context menu cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment. Created 5 years, 5 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.h
diff --git a/chrome/browser/extensions/menu_manager.h b/chrome/browser/extensions/menu_manager.h
index ab5471e21e60fd825622c6779379a7ba96412cf4..1bf44022401779b6aa342720f22f1bc159261031 100644
--- a/chrome/browser/extensions/menu_manager.h
+++ b/chrome/browser/extensions/menu_manager.h
@@ -44,17 +44,23 @@ class MenuItem {
// A list of MenuItems.
typedef std::vector<MenuItem*> List;
- // Key used to identify which extension a menu item belongs to.
- // A menu item can also belong to a <webview> inside an extension,
- // only in that case |webview_instance_id| would be
- // non-zero (i.e. != guestview::kInstanceIDNone).
+ // Key used to identify which extension a menu item belongs to. A menu item
+ // can also belong to a <webview>, in which case |webview_embedder_process_id|
+ // and |webview_instance_id| will be non-zero. When two ExtensionKeys are
+ // compared, an empty |extension_id| will match any other extension ID. This
+ // allows menu items belonging to webviews to be found with only the two
+ // webview IDs when the extension ID is not known. This is currently done from
+ // ChromeExtensionsBrowserClient::CleanUpWebView().
struct ExtensionKey {
std::string extension_id;
+ int webview_embedder_process_id;
int webview_instance_id;
ExtensionKey();
- ExtensionKey(const std::string& extension_id, int webview_instance_id);
explicit ExtensionKey(const std::string& extension_id);
+ ExtensionKey(const std::string& extension_id,
+ int webview_embedder_process_id,
+ int webview_instance_id);
bool operator==(const ExtensionKey& other) const;
bool operator!=(const ExtensionKey& other) const;
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698