| OLD | NEW |
| 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_UI_COCOA_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_M
AC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_M
AC_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_M
AC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_M
AC_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // SimpleMenuModel::Delegate implementation. | 26 // SimpleMenuModel::Delegate implementation. |
| 27 void ExecuteCommand(int command_id, int event_flags) override; | 27 void ExecuteCommand(int command_id, int event_flags) override; |
| 28 bool IsCommandIdChecked(int command_id) const override; | 28 bool IsCommandIdChecked(int command_id) const override; |
| 29 bool IsCommandIdEnabled(int command_id) const override; | 29 bool IsCommandIdEnabled(int command_id) const override; |
| 30 | 30 |
| 31 // RenderViewContextMenuBase implementation. | 31 // RenderViewContextMenuBase implementation. |
| 32 void Show() override; | 32 void Show() override; |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 // RenderViewContextMenu implementation. | 35 // RenderViewContextMenu implementation. |
| 36 bool GetAcceleratorForCommandId(int command_id, | |
| 37 ui::Accelerator* accelerator) const override; | |
| 38 void AppendPlatformEditableItems() override; | 36 void AppendPlatformEditableItems() override; |
| 39 | 37 |
| 40 private: | 38 private: |
| 41 friend class ToolkitDelegateMac; | 39 friend class ToolkitDelegateMac; |
| 42 | 40 |
| 43 // Adds menu to the platform's toolkit. | 41 // Adds menu to the platform's toolkit. |
| 44 void InitToolkitMenu(); | 42 void InitToolkitMenu(); |
| 45 | 43 |
| 46 // Cancels the menu. | 44 // Cancels the menu. |
| 47 void CancelToolkitMenu(); | 45 void CancelToolkitMenu(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 }; | 78 }; |
| 81 | 79 |
| 82 // The ChromeSwizzleServicesMenuUpdater filters Services menu items in the | 80 // The ChromeSwizzleServicesMenuUpdater filters Services menu items in the |
| 83 // contextual menus and elsewhere using swizzling. | 81 // contextual menus and elsewhere using swizzling. |
| 84 @interface ChromeSwizzleServicesMenuUpdater : NSObject | 82 @interface ChromeSwizzleServicesMenuUpdater : NSObject |
| 85 // Return filtered entries, for testing. | 83 // Return filtered entries, for testing. |
| 86 + (void)storeFilteredEntriesForTestingInArray:(NSMutableArray*)array; | 84 + (void)storeFilteredEntriesForTestingInArray:(NSMutableArray*)array; |
| 87 @end | 85 @end |
| 88 | 86 |
| 89 #endif // CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MEN
U_MAC_H_ | 87 #endif // CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MEN
U_MAC_H_ |
| OLD | NEW |