| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 VIEWS_CONTROLS_MENU_VIEW_MENU_DELEGATE_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_VIEW_MENU_DELEGATE_H_ |
| 6 #define VIEWS_CONTROLS_MENU_VIEW_MENU_DELEGATE_H_ | 6 #define VIEWS_CONTROLS_MENU_VIEW_MENU_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "gfx/native_widget_types.h" | 8 #include "gfx/native_widget_types.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // An interface that allows a component to tell a View about a menu that it | 22 // An interface that allows a component to tell a View about a menu that it |
| 23 // has constructed that the view can show (e.g. for MenuButton views, or as a | 23 // has constructed that the view can show (e.g. for MenuButton views, or as a |
| 24 // context menu.) | 24 // context menu.) |
| 25 // | 25 // |
| 26 //////////////////////////////////////////////////////////////////////////////// | 26 //////////////////////////////////////////////////////////////////////////////// |
| 27 class ViewMenuDelegate { | 27 class ViewMenuDelegate { |
| 28 public: | 28 public: |
| 29 // Create and show a menu at the specified position. Source is the view the | 29 // Create and show a menu at the specified position. Source is the view the |
| 30 // ViewMenuDelegate was set on. | 30 // ViewMenuDelegate was set on. |
| 31 virtual void RunMenu(View* source, const gfx::Point& pt) = 0; | 31 virtual void RunMenu(View* source, const gfx::Point& pt) = 0; |
| 32 |
| 33 protected: |
| 34 virtual ~ViewMenuDelegate() {} |
| 32 }; | 35 }; |
| 33 | 36 |
| 34 } // namespace views | 37 } // namespace views |
| 35 | 38 |
| 36 #endif // VIEWS_CONTROLS_MENU_VIEW_MENU_DELEGATE_H_ | 39 #endif // VIEWS_CONTROLS_MENU_VIEW_MENU_DELEGATE_H_ |
| OLD | NEW |