| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 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 10 matching lines...) Expand all Loading... |
| 21 uint32_t triggering_event_time); | 21 uint32_t triggering_event_time); |
| 22 | 22 |
| 23 virtual ~RenderViewContextMenuGtk(); | 23 virtual ~RenderViewContextMenuGtk(); |
| 24 | 24 |
| 25 // Show the menu at the given location. | 25 // Show the menu at the given location. |
| 26 void Popup(const gfx::Point& point); | 26 void Popup(const gfx::Point& point); |
| 27 | 27 |
| 28 // Menu::Delegate implementation --------------------------------------------- | 28 // Menu::Delegate implementation --------------------------------------------- |
| 29 virtual bool AlwaysShowIconForCmd(int command_id) const; | 29 virtual bool AlwaysShowIconForCmd(int command_id) const; |
| 30 | 30 |
| 31 // RenderViewContextMenuDelegate implementation ------------------------------ |
| 32 virtual void UpdateMenuItem(int command_id, |
| 33 bool enabled, |
| 34 const string16& title) OVERRIDE; |
| 35 |
| 31 protected: | 36 protected: |
| 32 // RenderViewContextMenu implementation -------------------------------------- | 37 // RenderViewContextMenu implementation -------------------------------------- |
| 33 virtual void PlatformInit(); | 38 virtual void PlatformInit(); |
| 34 // TODO(port): implement. | 39 // TODO(port): implement. |
| 35 virtual bool GetAcceleratorForCommandId( | 40 virtual bool GetAcceleratorForCommandId( |
| 36 int command_id, | 41 int command_id, |
| 37 ui::Accelerator* accelerator); | 42 ui::Accelerator* accelerator); |
| 38 | 43 |
| 39 private: | 44 private: |
| 40 scoped_ptr<MenuGtk> menu_gtk_; | 45 scoped_ptr<MenuGtk> menu_gtk_; |
| 41 uint32_t triggering_event_time_; | 46 uint32_t triggering_event_time_; |
| 42 }; | 47 }; |
| 43 | 48 |
| 44 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ | 49 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_ |
| OLD | NEW |