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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h

Issue 178193005: Move render_view_context_menu.* related files out of tab_contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: context_menu->renderer_context_menu for disambiguation Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
diff --git a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
deleted file mode 100644
index 6b37bec4fab8f8e4fc0b18c243ece35c832e8b97..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_
-#define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_
-
-#import <Cocoa/Cocoa.h>
-
-#include "base/mac/scoped_nsobject.h"
-#include "chrome/browser/tab_contents/render_view_context_menu.h"
-
-@class MenuController;
-
-// Mac implementation of the context menu display code. Uses a Cocoa NSMenu
-// to display the context menu. Internally uses an obj-c object as the
-// target of the NSMenu, bridging back to this C++ class.
-class RenderViewContextMenuMac : public RenderViewContextMenu {
- public:
- RenderViewContextMenuMac(content::RenderFrameHost* render_frame_host,
- const content::ContextMenuParams& params,
- NSView* parent_view);
- virtual ~RenderViewContextMenuMac();
-
- // SimpleMenuModel::Delegate implementation.
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
-
- // RenderViewContextMenuDelegate implementation.
- virtual void UpdateMenuItem(int command_id,
- bool enabled,
- bool hidden,
- const base::string16& title) OVERRIDE;
-
- protected:
- // RenderViewContextMenu implementation.
- virtual void PlatformInit() OVERRIDE;
- virtual void PlatformCancel() OVERRIDE;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void AppendPlatformEditableItems() OVERRIDE;
-
- private:
- // Adds platform-specific items to the menu.
- void InitPlatformMenu();
-
- // Adds writing direction submenu.
- void AppendBidiSubMenu();
-
- // Handler for the "Look Up in Dictionary" menu item.
- void LookUpInDictionary();
-
- // Handler for the "Start Speaking" menu item.
- void StartSpeaking();
-
- // Handler for the "Stop Speaking" menu item.
- void StopSpeaking();
-
- // The Cocoa menu controller for this menu.
- base::scoped_nsobject<MenuController> menu_controller_;
-
- // Model for the "Speech" submenu.
- ui::SimpleMenuModel speech_submenu_model_;
-
- // Model for the BiDi input submenu.
- ui::SimpleMenuModel bidi_submenu_model_;
-
- // The Cocoa parent view.
- NSView* parent_view_;
-
- DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuMac);
-};
-
-#endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698