OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 | 5 |
6 #ifndef VIEWS_CONTROLS_MENU_MENU_HOST_WIN_H_ | 6 #ifndef VIEWS_CONTROLS_MENU_MENU_HOST_WIN_H_ |
7 #define VIEWS_CONTROLS_MENU_MENU_HOST_WIN_H_ | 7 #define VIEWS_CONTROLS_MENU_MENU_HOST_WIN_H_ |
8 | 8 |
9 #include "views/widget/widget_win.h" | 9 #include "views/widget/widget_win.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 const gfx::Rect& bounds, | 21 const gfx::Rect& bounds, |
22 View* contents_view, | 22 View* contents_view, |
23 bool do_capture); | 23 bool do_capture); |
24 | 24 |
25 gfx::NativeWindow GetNativeWindow() { return GetNativeView(); } | 25 gfx::NativeWindow GetNativeWindow() { return GetNativeView(); } |
26 | 26 |
27 void Show(); | 27 void Show(); |
28 virtual void Hide(); | 28 virtual void Hide(); |
29 virtual void HideWindow(); | 29 virtual void HideWindow(); |
30 virtual void OnCaptureChanged(HWND hwnd); | 30 virtual void OnCaptureChanged(HWND hwnd); |
| 31 void DoCapture(); |
31 void ReleaseCapture(); | 32 void ReleaseCapture(); |
32 | 33 |
33 protected: | 34 protected: |
34 virtual RootView* CreateRootView(); | 35 virtual RootView* CreateRootView(); |
35 | 36 |
36 virtual void OnCancelMode(); | 37 virtual void OnCancelMode(); |
37 | 38 |
38 // Overriden to return false, we do NOT want to release capture on mouse | 39 // Overriden to return false, we do NOT want to release capture on mouse |
39 // release. | 40 // release. |
40 virtual bool ReleaseCaptureOnMouseReleased(); | 41 virtual bool ReleaseCaptureOnMouseReleased(); |
41 | 42 |
42 private: | 43 private: |
43 // If true, we've been closed. | 44 // If true, we've been closed. |
44 bool closed_; | 45 bool closed_; |
45 | 46 |
46 // If true, we own the capture and need to release it. | 47 // If true, we own the capture and need to release it. |
47 bool owns_capture_; | 48 bool owns_capture_; |
48 | 49 |
49 // The view we contain. | 50 // The view we contain. |
50 SubmenuView* submenu_; | 51 SubmenuView* submenu_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(MenuHost); | 53 DISALLOW_COPY_AND_ASSIGN(MenuHost); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace views | 56 } // namespace views |
56 | 57 |
57 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_WIN_H_ | 58 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_WIN_H_ |
OLD | NEW |