| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_VIEW_MENU_DELEGATE_H__ | 5 #ifndef CHROME_VIEWS_VIEW_MENU_DELEGATE_H__ |
| 6 #define CHROME_VIEWS_VIEW_MENU_DELEGATE_H__ | 6 #define CHROME_VIEWS_VIEW_MENU_DELEGATE_H__ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| 11 | 11 |
| 12 class View; | 12 class View; |
| 13 | 13 |
| 14 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// |
| 15 // | 15 // |
| 16 // MenuDelegate | 16 // MenuDelegate |
| 17 // | 17 // |
| 18 // An interface that allows a component to tell a View about a menu that it | 18 // An interface that allows a component to tell a View about a menu that it |
| 19 // has constructed that the view can show (e.g. for MenuButton views, or as a | 19 // has constructed that the view can show (e.g. for MenuButton views, or as a |
| 20 // context menu.) | 20 // context menu.) |
| 21 // | 21 // |
| 22 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
| 23 class ViewMenuDelegate { | 23 class ViewMenuDelegate { |
| 24 public: | 24 public: |
| 25 // Create and show a menu at the specified position. Source is the view the | 25 // Create and show a menu at the specified position. Source is the view the |
| 26 // ViewMenuDelegate was set on. | 26 // ViewMenuDelegate was set on. |
| 27 virtual void RunMenu(View* source, const CPoint& pt, HWND hwnd) = 0; | 27 virtual void RunMenu(View* source, const gfx::Point& pt, HWND hwnd) = 0; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 } // namespace views | 30 } // namespace views |
| 31 | 31 |
| 32 #endif // CHROME_VIEWS_VIEW_MENU_DELEGATE_H__ | 32 #endif // CHROME_VIEWS_VIEW_MENU_DELEGATE_H__ |
| 33 | 33 |
| OLD | NEW |