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_DELEGATE_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ |
6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ | 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ |
7 | 7 |
8 namespace views { | 8 namespace views { |
9 class MenuHost; | 9 class MenuHost; |
10 class RootView; | 10 class RootView; |
11 namespace internal { | 11 namespace internal { |
| 12 class NativeWidgetDelegate; |
12 | 13 |
13 class NativeMenuHostDelegate { | 14 class NativeMenuHostDelegate { |
14 public: | 15 public: |
15 virtual ~NativeMenuHostDelegate() {} | 16 virtual ~NativeMenuHostDelegate() {} |
16 | 17 |
17 // Called when the NativeMenuHost is being destroyed. | 18 // Called when the NativeMenuHost is being destroyed. |
18 virtual void OnNativeMenuHostDestroy() = 0; | 19 virtual void OnNativeMenuHostDestroy() = 0; |
19 | 20 |
20 // Called when the NativeMenuHost is losing input capture. | 21 // Called when the NativeMenuHost is losing input capture. |
21 virtual void OnNativeMenuHostCancelCapture() = 0; | 22 virtual void OnNativeMenuHostCancelCapture() = 0; |
22 | 23 |
23 // Pass-thrus for Widget overrides. | 24 virtual NativeWidgetDelegate* AsNativeWidgetDelegate() = 0; |
24 // TODO(beng): Remove once MenuHost is-a Widget. | |
25 virtual RootView* CreateRootView() = 0; | |
26 virtual bool ShouldReleaseCaptureOnMouseRelease() const = 0; | |
27 }; | 25 }; |
28 | 26 |
29 } // namespace internal | 27 } // namespace internal |
30 } // namespace views | 28 } // namespace views |
31 | 29 |
32 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ | 30 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ |
33 | 31 |
OLD | NEW |