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

Side by Side Diff: chrome/browser/tab_contents/context_menu_utils.h

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_TAB_CONTENTS_CONTEXT_MENU_UTILS_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_CONTEXT_MENU_UTILS_H_
7 #pragma once
8
9 #include <string>
10 #include <vector>
11
12 #include "chrome/browser/extensions/extension_menu_manager.h"
13 #include "webkit/glue/context_menu.h"
14
15 class ExtensionService;
16 class Profile;
17 using WebKit::WebContextMenuData;
18
19 // Context menu utilities.
20 class ContextMenuUtils {
21 public:
22 // Gets document url out of context menu paramaters.
23 static const GURL& GetDocumentURL(const ContextMenuParams& params);
24
25 // Given a list of items, returns the ones that match given the contents
26 // of |params| and the profile.
27 static ExtensionMenuItem::List GetRelevantExtensionItems(
28 const ExtensionMenuItem::List& items,
29 const ContextMenuParams& params,
30 Profile* profile,
31 bool can_cross_incognito);
32
33 // Get a list of extension id's that have context menu items, and sort it by
34 // the extension's name.
35 static void GetSortedContextMenuExtensionIds(
36 ExtensionService* service,
37 ExtensionMenuManager* menu_manager,
38 std::vector<std::pair<std::string, std::string> >* sorted_ids);
39
40 private:
41 ContextMenuUtils() {}
42 DISALLOW_COPY_AND_ASSIGN(ContextMenuUtils);
43 };
44
45 #endif // CHROME_BROWSER_TAB_CONTENTS_CONTEXT_MENU_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698