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

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

Issue 1754393002: Fix current profile is unnecessary added to "Open link as" context menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix implicit conversion of signed and unsigned integers Created 4 years, 9 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // menu. 54 // menu.
55 bool IsItemInRangePresent(int command_id_first, int command_id_last); 55 bool IsItemInRangePresent(int command_id_first, int command_id_last);
56 56
57 // Searches for an menu item with |command_id|. If it's found, the return 57 // Searches for an menu item with |command_id|. If it's found, the return
58 // value is true and the model and index where it appears in that model are 58 // value is true and the model and index where it appears in that model are
59 // returned in |found_model| and |found_index|. Otherwise returns false. 59 // returned in |found_model| and |found_index|. Otherwise returns false.
60 bool GetMenuModelAndItemIndex(int command_id, 60 bool GetMenuModelAndItemIndex(int command_id,
61 ui::MenuModel** found_model, 61 ui::MenuModel** found_model,
62 int* found_index); 62 int* found_index);
63 63
64 size_t GetItemIndexByProfilePath(const base::FilePath& path); 64 // Returns the command id of the menu item with the specified |path|.
65 int GetCommandIDByProfilePath(const base::FilePath& path);
65 66
66 #if defined(ENABLE_EXTENSIONS) 67 #if defined(ENABLE_EXTENSIONS)
67 extensions::ContextMenuMatcher& extension_items() { return extension_items_; } 68 extensions::ContextMenuMatcher& extension_items() { return extension_items_; }
68 #endif 69 #endif
69 70
70 void set_protocol_handler_registry(ProtocolHandlerRegistry* registry) { 71 void set_protocol_handler_registry(ProtocolHandlerRegistry* registry) {
71 protocol_handler_registry_ = registry; 72 protocol_handler_registry_ = registry;
72 } 73 }
73 74
74 using RenderViewContextMenu::AppendImageItems; 75 using RenderViewContextMenu::AppendImageItems;
75 76
76 void Show() override; 77 void Show() override;
77 78
78 private: 79 private:
79 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu); 80 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu);
80 }; 81 };
81 82
82 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UT IL_H_ 83 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UT IL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698