OLD | NEW |
(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 "chrome/browser/extensions/extension_menu_manager.h" |
| 10 #include "webkit/glue/context_menu.h" |
| 11 |
| 12 class Profile; |
| 13 using WebKit::WebContextMenuData; |
| 14 |
| 15 // Context menu utilities. |
| 16 class ContextMenuUtils { |
| 17 public: |
| 18 // Gets document url out of context menu paramaters. |
| 19 static const GURL& GetDocumentURL(const ContextMenuParams& params); |
| 20 |
| 21 // Given a list of items, returns the ones that match given the contents |
| 22 // of |params| and the profile. |
| 23 static ExtensionMenuItem::List GetRelevantExtensionItems( |
| 24 const ExtensionMenuItem::List& items, |
| 25 const ContextMenuParams& params, |
| 26 Profile* profile, |
| 27 bool can_cross_incognito); |
| 28 |
| 29 private: |
| 30 ContextMenuUtils() {} |
| 31 DISALLOW_COPY_AND_ASSIGN(ContextMenuUtils); |
| 32 }; |
| 33 |
| 34 #endif // CHROME_BROWSER_TAB_CONTENTS_CONTEXT_MENU_UTILS_H_ |
OLD | NEW |