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

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

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 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 24 matching lines...) Expand all
35 // This is a lightweight method to create a test RenderViewContextMenu 35 // This is a lightweight method to create a test RenderViewContextMenu
36 // instance. 36 // instance.
37 // Use the constructor if you want to create menu with fine-grained params. 37 // Use the constructor if you want to create menu with fine-grained params.
38 static TestRenderViewContextMenu* Create(content::WebContents* web_contents, 38 static TestRenderViewContextMenu* Create(content::WebContents* web_contents,
39 const GURL& page_url, 39 const GURL& page_url,
40 const GURL& link_url, 40 const GURL& link_url,
41 const GURL& frame_url); 41 const GURL& frame_url);
42 42
43 // Implementation of pure virtuals in RenderViewContextMenu. 43 // Implementation of pure virtuals in RenderViewContextMenu.
44 bool GetAcceleratorForCommandId(int command_id, 44 bool GetAcceleratorForCommandId(int command_id,
45 ui::Accelerator* accelerator) override; 45 ui::Accelerator* accelerator) const override;
46 46
47 // Returns true if the command specified by |command_id| is present 47 // Returns true if the command specified by |command_id| is present
48 // in the menu. 48 // in the menu.
49 // A list of command ids can be found in chrome/app/chrome_command_ids.h. 49 // A list of command ids can be found in chrome/app/chrome_command_ids.h.
50 bool IsItemPresent(int command_id); 50 bool IsItemPresent(int command_id);
51 51
52 // Returns true if a command specified by any command id between 52 // Returns true if a command specified by any command id between
53 // |command_id_first| and |command_id_last| (inclusive) is present in the 53 // |command_id_first| and |command_id_last| (inclusive) is present in the
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);
(...skipping 18 matching lines...) Expand all
74 74
75 using RenderViewContextMenu::AppendImageItems; 75 using RenderViewContextMenu::AppendImageItems;
76 76
77 void Show() override; 77 void Show() override;
78 78
79 private: 79 private:
80 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu); 80 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu);
81 }; 81 };
82 82
83 #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