| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 content::WebContents* web_contents, | 65 content::WebContents* web_contents, |
| 66 const content::ContextMenuParams& params); | 66 const content::ContextMenuParams& params); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 friend class ::ExtensionContextMenuBrowserTest; | 69 friend class ::ExtensionContextMenuBrowserTest; |
| 70 | 70 |
| 71 bool GetRelevantExtensionTopLevelItems( | 71 bool GetRelevantExtensionTopLevelItems( |
| 72 const MenuItem::ExtensionKey& extension_key, | 72 const MenuItem::ExtensionKey& extension_key, |
| 73 const Extension** extension, | 73 const Extension** extension, |
| 74 bool* can_cross_incognito, | 74 bool* can_cross_incognito, |
| 75 MenuItem::List& items); | 75 MenuItem::List* items); |
| 76 | 76 |
| 77 MenuItem::List GetRelevantExtensionItems( | 77 MenuItem::List GetRelevantExtensionItems( |
| 78 const MenuItem::List& items, | 78 const MenuItem::List& items, |
| 79 bool can_cross_incognito); | 79 bool can_cross_incognito); |
| 80 | 80 |
| 81 // Used for recursively adding submenus of extension items. | 81 // Used for recursively adding submenus of extension items. |
| 82 void RecursivelyAppendExtensionItems(const MenuItem::List& items, | 82 void RecursivelyAppendExtensionItems(const MenuItem::List& items, |
| 83 bool can_cross_incognito, | 83 bool can_cross_incognito, |
| 84 const base::string16& selection_text, | 84 const base::string16& selection_text, |
| 85 ui::SimpleMenuModel* menu_model, | 85 ui::SimpleMenuModel* menu_model, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 103 | 103 |
| 104 // Keep track of and clean up menu models for submenus. | 104 // Keep track of and clean up menu models for submenus. |
| 105 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; | 105 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(ContextMenuMatcher); | 107 DISALLOW_COPY_AND_ASSIGN(ContextMenuMatcher); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace extensions | 110 } // namespace extensions |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ | 112 #endif // CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ |
| OLD | NEW |