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

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

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. 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 22 matching lines...) Expand all
33 33
34 // Factory. 34 // Factory.
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.
44 bool GetAcceleratorForCommandId(int command_id,
45 ui::Accelerator* accelerator) const override;
46
47 // Returns true if the command specified by |command_id| is present 43 // Returns true if the command specified by |command_id| is present
48 // in the menu. 44 // in the menu.
49 // A list of command ids can be found in chrome/app/chrome_command_ids.h. 45 // A list of command ids can be found in chrome/app/chrome_command_ids.h.
50 bool IsItemPresent(int command_id); 46 bool IsItemPresent(int command_id);
51 47
52 // Returns true if a command specified by any command id between 48 // Returns true if a command specified by any command id between
53 // |command_id_first| and |command_id_last| (inclusive) is present in the 49 // |command_id_first| and |command_id_last| (inclusive) is present in the
54 // menu. 50 // menu.
55 bool IsItemInRangePresent(int command_id_first, int command_id_last); 51 bool IsItemInRangePresent(int command_id_first, int command_id_last);
56 52
(...skipping 17 matching lines...) Expand all
74 70
75 using RenderViewContextMenu::AppendImageItems; 71 using RenderViewContextMenu::AppendImageItems;
76 72
77 void Show() override; 73 void Show() override;
78 74
79 private: 75 private:
80 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu); 76 DISALLOW_COPY_AND_ASSIGN(TestRenderViewContextMenu);
81 }; 77 };
82 78
83 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UT IL_H_ 79 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_TEST_UT IL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698