| 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 VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_H_ |
| 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_H_ | 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 class Rect; | 11 class Rect; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 class NativeWidget; | 15 class NativeWidget; |
| 16 namespace internal { | 16 namespace internal { |
| 17 class NativeMenuHostDelegate; | 17 class NativeMenuHostDelegate; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class NativeMenuHost { | 20 class NativeMenuHost { |
| 21 public: | 21 public: |
| 22 virtual ~NativeMenuHost() {} | 22 virtual ~NativeMenuHost() {} |
| 23 | 23 |
| 24 static NativeMenuHost* CreateNativeMenuHost( | 24 static NativeMenuHost* CreateNativeMenuHost( |
| 25 internal::NativeMenuHostDelegate* delegate); | 25 internal::NativeMenuHostDelegate* delegate); |
| 26 | 26 |
| 27 // Initializes and shows the MenuHost. | |
| 28 virtual void InitMenuHost(gfx::NativeWindow parent, | |
| 29 const gfx::Rect& bounds) = 0; | |
| 30 | |
| 31 // Starts capturing input events. | 27 // Starts capturing input events. |
| 32 virtual void StartCapturing() = 0; | 28 virtual void StartCapturing() = 0; |
| 33 | 29 |
| 34 virtual NativeWidget* AsNativeWidget() = 0; | 30 virtual NativeWidget* AsNativeWidget() = 0; |
| 35 }; | 31 }; |
| 36 | 32 |
| 37 } // namespace views | 33 } // namespace views |
| 38 | 34 |
| 39 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_H_ | 35 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_H_ |
| OLD | NEW |