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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h

Issue 667483004: Ifdef extensions usage in RendererContextMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UTIL_ H_ 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UTIL_ H_
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UTIL_ H_ 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UTIL_ H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/extensions/context_menu_matcher.h"
10 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 9 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
11 #include "url/gurl.h" 10 #include "url/gurl.h"
12 11
12 #if defined(ENABLE_EXTENSIONS)
13 #include "chrome/browser/extensions/context_menu_matcher.h"
14 #endif
15
13 class Browser; 16 class Browser;
14 17
15 namespace content { 18 namespace content {
16 class WebContents; 19 class WebContents;
17 } 20 }
18 namespace ui { 21 namespace ui {
19 class MenuModel; 22 class MenuModel;
20 } 23 }
21 24
22 class TestRenderViewContextMenu : public RenderViewContextMenu { 25 class TestRenderViewContextMenu : public RenderViewContextMenu {
(...skipping 20 matching lines...) Expand all
43 // List of command ids can be found in chrome/app/chrome_command_ids.h. 46 // List of command ids can be found in chrome/app/chrome_command_ids.h.
44 bool IsItemPresent(int command_id); 47 bool IsItemPresent(int command_id);
45 48
46 // Searches for an menu item with |command_id|. If it's found, the return 49 // Searches for an menu item with |command_id|. If it's found, the return
47 // value is true and the model and index where it appears in that model are 50 // value is true and the model and index where it appears in that model are
48 // returned in |found_model| and |found_index|. Otherwise returns false. 51 // returned in |found_model| and |found_index|. Otherwise returns false.
49 bool GetMenuModelAndItemIndex(int command_id, 52 bool GetMenuModelAndItemIndex(int command_id,
50 ui::MenuModel** found_model, 53 ui::MenuModel** found_model,
51 int* found_index); 54 int* found_index);
52 55
56 #if defined(ENABLE_EXTENSIONS)
53 extensions::ContextMenuMatcher& extension_items() { return extension_items_; } 57 extensions::ContextMenuMatcher& extension_items() { return extension_items_; }
58 #endif
54 59
55 private: 60 private:
56 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu); 61 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu);
57 }; 62 };
58 63
59 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UT IL_H_ 64 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UT IL_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698