Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: ui/views/controls/menu/menu_host.h

Issue 10154013: Fixes crash in closing menus. There are two issues here: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OnOwnerClosing and more comments Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // Releases a mouse grab installed by |ShowMenuHost|. 55 // Releases a mouse grab installed by |ShowMenuHost|.
56 void ReleaseMenuHostCapture(); 56 void ReleaseMenuHostCapture();
57 57
58 private: 58 private:
59 // Overridden from Widget: 59 // Overridden from Widget:
60 virtual internal::RootView* CreateRootView() OVERRIDE; 60 virtual internal::RootView* CreateRootView() OVERRIDE;
61 virtual bool ShouldReleaseCaptureOnMouseReleased() const OVERRIDE; 61 virtual bool ShouldReleaseCaptureOnMouseReleased() const OVERRIDE;
62 virtual void OnMouseCaptureLost() OVERRIDE; 62 virtual void OnMouseCaptureLost() OVERRIDE;
63 virtual void OnNativeWidgetDestroyed() OVERRIDE; 63 virtual void OnNativeWidgetDestroyed() OVERRIDE;
64 virtual void OnOwnerClosing() OVERRIDE;
64 65
65 // The view we contain. 66 // The view we contain.
66 SubmenuView* submenu_; 67 SubmenuView* submenu_;
67 68
68 // If true, DestroyMenuHost has been invoked. 69 // If true, DestroyMenuHost has been invoked.
69 bool destroying_; 70 bool destroying_;
70 71
71 // If true and capture is lost we don't notify the delegate. 72 // If true and capture is lost we don't notify the delegate.
72 bool ignore_capture_lost_; 73 bool ignore_capture_lost_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(MenuHost); 75 DISALLOW_COPY_AND_ASSIGN(MenuHost);
75 }; 76 };
76 77
77 } // namespace views 78 } // namespace views
78 79
79 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ 80 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698