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

Side by Side Diff: chrome/browser/extensions/context_menu_matcher.h

Issue 12299013: Fix top-level context menus sorting by name (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
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 #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 22 matching lines...) Expand all
33 33
34 // This is a helper function to append items for one particular extension. 34 // This is a helper function to append items for one particular extension.
35 // The |index| parameter is used for assigning id's, and is incremented for 35 // The |index| parameter is used for assigning id's, and is incremented for
36 // each item actually added. 36 // each item actually added.
37 void AppendExtensionItems(const std::string& extension_id, 37 void AppendExtensionItems(const std::string& extension_id,
38 const string16& selection_text, 38 const string16& selection_text,
39 int* index); 39 int* index);
40 40
41 void Clear(); 41 void Clear();
42 42
43 // This function returns the top level context menu title of an extension
44 // based on a printable selection text
Yoyo Zhou 2013/02/19 19:00:50 nit: Comments should end with a period.
François Beaufort 2013/02/20 11:32:06 Done.
45 std::string GetTopLevelContextMenuTitle(const std::string& extension_id,
46 const string16& selection_text);
47
43 bool IsCommandIdChecked(int command_id) const; 48 bool IsCommandIdChecked(int command_id) const;
44 bool IsCommandIdEnabled(int command_id) const; 49 bool IsCommandIdEnabled(int command_id) const;
45 void ExecuteCommand(int command_id, 50 void ExecuteCommand(int command_id,
46 content::WebContents* web_contents, 51 content::WebContents* web_contents,
47 const content::ContextMenuParams& params); 52 const content::ContextMenuParams& params);
48 53
49 private: 54 private:
50 friend class ::ExtensionContextMenuBrowserTest; 55 friend class ::ExtensionContextMenuBrowserTest;
51 56
52 MenuItem::List GetRelevantExtensionItems( 57 MenuItem::List GetRelevantExtensionItems(
(...skipping 24 matching lines...) Expand all
77 82
78 // Keep track of and clean up menu models for submenus. 83 // Keep track of and clean up menu models for submenus.
79 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; 84 ScopedVector<ui::SimpleMenuModel> extension_menu_models_;
80 85
81 DISALLOW_COPY_AND_ASSIGN(ContextMenuMatcher); 86 DISALLOW_COPY_AND_ASSIGN(ContextMenuMatcher);
82 }; 87 };
83 88
84 } // namespace extensions 89 } // namespace extensions
85 90
86 #endif // CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_ 91 #endif // CHROME_BROWSER_EXTENSIONS_CONTEXT_MENU_MATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/context_menu_matcher.cc » ('j') | chrome/browser/extensions/context_menu_matcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698