| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ | 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ |
| 7 | 7 |
| 8 #include "app/menus/simple_menu_model.h" | 8 #include "app/menus/simple_menu_model.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/scoped_vector.h" | 10 #include "base/scoped_vector.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 gfx::NativeMenu GetMenuHandle() const { | 23 gfx::NativeMenu GetMenuHandle() const { |
| 24 return (menu_.get() ? menu_->GetNativeMenu() : NULL); | 24 return (menu_.get() ? menu_->GetNativeMenu() : NULL); |
| 25 } | 25 } |
| 26 | 26 |
| 27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
| 28 // Set this menu to show for an external tab contents. This | 28 // Set this menu to show for an external tab contents. This |
| 29 // only has an effect before Init() is called. | 29 // only has an effect before Init() is called. |
| 30 void SetExternal(); | 30 void SetExternal(); |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 void UpdateMenuItemStates(); |
| 34 |
| 33 protected: | 35 protected: |
| 34 // RenderViewContextMenu implementation -------------------------------------- | 36 // RenderViewContextMenu implementation -------------------------------------- |
| 35 virtual void PlatformInit(); | 37 virtual void PlatformInit(); |
| 36 virtual bool GetAcceleratorForCommandId(int command_id, | 38 virtual bool GetAcceleratorForCommandId(int command_id, |
| 37 menus::Accelerator* accelerator); | 39 menus::Accelerator* accelerator); |
| 38 private: | 40 private: |
| 39 // The current radio group for radio menu items. | 41 // The current radio group for radio menu items. |
| 40 int current_radio_group_id_; | 42 int current_radio_group_id_; |
| 41 | 43 |
| 42 // The context menu itself and its contents. | 44 // The context menu itself and its contents. |
| 43 scoped_ptr<views::Menu2> menu_; | 45 scoped_ptr<views::Menu2> menu_; |
| 44 | 46 |
| 45 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuViews); | 47 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuViews); |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ | 50 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ |
| OLD | NEW |