| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 10 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 content::RenderWidgetHostView* view); | 24 content::RenderWidgetHostView* view); |
| 25 | 25 |
| 26 virtual ~RenderViewContextMenuGtk(); | 26 virtual ~RenderViewContextMenuGtk(); |
| 27 | 27 |
| 28 // Show the menu at the given location. | 28 // Show the menu at the given location. |
| 29 void Popup(const gfx::Point& point); | 29 void Popup(const gfx::Point& point); |
| 30 | 30 |
| 31 // Menu::Delegate implementation --------------------------------------------- | 31 // Menu::Delegate implementation --------------------------------------------- |
| 32 virtual bool AlwaysShowIconForCmd(int command_id) const OVERRIDE; | 32 virtual bool AlwaysShowIconForCmd(int command_id) const OVERRIDE; |
| 33 | 33 |
| 34 // SimpleMenuModel::Delegate implementation. |
| 35 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| 36 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 37 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 38 |
| 34 // RenderViewContextMenuDelegate implementation ------------------------------ | 39 // RenderViewContextMenuDelegate implementation ------------------------------ |
| 35 virtual void UpdateMenuItem(int command_id, | 40 virtual void UpdateMenuItem(int command_id, |
| 36 bool enabled, | 41 bool enabled, |
| 37 bool hidden, | 42 bool hidden, |
| 38 const string16& title) OVERRIDE; | 43 const string16& title) OVERRIDE; |
| 39 | 44 |
| 40 protected: | 45 protected: |
| 41 // RenderViewContextMenu implementation -------------------------------------- | 46 // RenderViewContextMenu implementation -------------------------------------- |
| 42 virtual void PlatformInit() OVERRIDE; | 47 virtual void PlatformInit() OVERRIDE; |
| 43 virtual void PlatformCancel() OVERRIDE; | 48 virtual void PlatformCancel() OVERRIDE; |
| 44 // TODO(port): implement. | 49 // TODO(port): implement. |
| 45 virtual bool GetAcceleratorForCommandId( | 50 virtual bool GetAcceleratorForCommandId( |
| 46 int command_id, | 51 int command_id, |
| 47 ui::Accelerator* accelerator) OVERRIDE; | 52 ui::Accelerator* accelerator) OVERRIDE; |
| 53 virtual void AppendPlatformEditableItems() OVERRIDE; |
| 48 | 54 |
| 49 private: | 55 private: |
| 56 // Adds writing direction submenu. |
| 57 void AppendBidiSubMenu(); |
| 58 |
| 59 // Model for the BiDi input submenu. |
| 60 ui::SimpleMenuModel bidi_submenu_model_; |
| 61 |
| 50 scoped_ptr<MenuGtk> menu_gtk_; | 62 scoped_ptr<MenuGtk> menu_gtk_; |
| 51 uint32_t triggering_event_time_; | 63 uint32_t triggering_event_time_; |
| 52 }; | 64 }; |
| 53 | 65 |
| 54 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ | 66 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ |
| OLD | NEW |