| Index: chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h
|
| diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h
|
| index e68bc947901d4c7ed81888792077a125ec55c4c2..154362f2df857f1c51fee3f7e3d678ca6946a85f 100644
|
| --- a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h
|
| +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h
|
| @@ -6,7 +6,18 @@
|
| #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UTIL_H_
|
|
|
| #include "base/basictypes.h"
|
| +#include "chrome/browser/extensions/context_menu_matcher.h"
|
| #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
|
| +#include "url/gurl.h"
|
| +
|
| +class Browser;
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +namespace ui {
|
| +class MenuModel;
|
| +}
|
|
|
| class TestRenderViewContextMenu : public RenderViewContextMenu {
|
| public:
|
| @@ -14,6 +25,13 @@ class TestRenderViewContextMenu : public RenderViewContextMenu {
|
| content::ContextMenuParams params);
|
| virtual ~TestRenderViewContextMenu();
|
|
|
| + // Factory.
|
| + static TestRenderViewContextMenu* Create(content::WebContents* web_contents,
|
| + const GURL& page_url,
|
| + const GURL& link_url,
|
| + const GURL& frame_url);
|
| +
|
| + // Implementation of pure virtuals in RenderViewContextMenu.
|
| virtual void PlatformInit() OVERRIDE;
|
| virtual void PlatformCancel() OVERRIDE;
|
| virtual bool GetAcceleratorForCommandId(
|
| @@ -25,6 +43,15 @@ class TestRenderViewContextMenu : public RenderViewContextMenu {
|
| // List of command ids can be found in chrome/app/chrome_command_ids.h.
|
| bool IsItemPresent(int command_id);
|
|
|
| + // Searches for an menu item with |command_id|. If it's found, the return
|
| + // value is true and the model and index where it appears in that model are
|
| + // returned in |found_model| and |found_index|. Otherwise returns false.
|
| + bool GetMenuModelAndItemIndex(int command_id,
|
| + ui::MenuModel** found_model,
|
| + int* found_index);
|
| +
|
| + extensions::ContextMenuMatcher& extension_items() { return extension_items_; }
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu);
|
| };
|
|
|