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

Side by Side Diff: ui/views/widget/widget.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, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 // True if the widget is considered top level widget. Top level widget 600 // True if the widget is considered top level widget. Top level widget
601 // is a widget of TYPE_WINDOW, TYPE_PANEL, TYPE_WINDOW_FRAMELESS, BUBBLE, 601 // is a widget of TYPE_WINDOW, TYPE_PANEL, TYPE_WINDOW_FRAMELESS, BUBBLE,
602 // POPUP or MENU, and has a focus manager and input method object associated 602 // POPUP or MENU, and has a focus manager and input method object associated
603 // with it. TYPE_CONTROL and TYPE_TOOLTIP is not considered top level. 603 // with it. TYPE_CONTROL and TYPE_TOOLTIP is not considered top level.
604 bool is_top_level() const { return is_top_level_; } 604 bool is_top_level() const { return is_top_level_; }
605 605
606 // Returns the bounds of work area in the screen that Widget belongs to. 606 // Returns the bounds of work area in the screen that Widget belongs to.
607 gfx::Rect GetWorkAreaBoundsInScreen() const; 607 gfx::Rect GetWorkAreaBoundsInScreen() const;
608 608
609 // Notification that our owner is closing.
610 // NOTE: this is not invoked for aura as it's currently not needed there.
611 // Under aura menus close by way of activation getting reset when the owner
612 // closes.
613 virtual void OnOwnerClosing();
614
609 // Overridden from NativeWidgetDelegate: 615 // Overridden from NativeWidgetDelegate:
610 virtual bool IsModal() const OVERRIDE; 616 virtual bool IsModal() const OVERRIDE;
611 virtual bool IsDialogBox() const OVERRIDE; 617 virtual bool IsDialogBox() const OVERRIDE;
612 virtual bool CanActivate() const OVERRIDE; 618 virtual bool CanActivate() const OVERRIDE;
613 virtual bool IsInactiveRenderingDisabled() const OVERRIDE; 619 virtual bool IsInactiveRenderingDisabled() const OVERRIDE;
614 virtual void EnableInactiveRendering() OVERRIDE; 620 virtual void EnableInactiveRendering() OVERRIDE;
615 virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE; 621 virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE;
616 virtual void OnNativeFocus(gfx::NativeView focused_view) OVERRIDE; 622 virtual void OnNativeFocus(gfx::NativeView focused_view) OVERRIDE;
617 virtual void OnNativeBlur(gfx::NativeView focused_view) OVERRIDE; 623 virtual void OnNativeBlur(gfx::NativeView focused_view) OVERRIDE;
618 virtual void OnNativeWidgetVisibilityChanged(bool visible) OVERRIDE; 624 virtual void OnNativeWidgetVisibilityChanged(bool visible) OVERRIDE;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 // duplicate move events even though the mouse hasn't moved. 780 // duplicate move events even though the mouse hasn't moved.
775 bool last_mouse_event_was_move_; 781 bool last_mouse_event_was_move_;
776 gfx::Point last_mouse_event_position_; 782 gfx::Point last_mouse_event_position_;
777 783
778 DISALLOW_COPY_AND_ASSIGN(Widget); 784 DISALLOW_COPY_AND_ASSIGN(Widget);
779 }; 785 };
780 786
781 } // namespace views 787 } // namespace views
782 788
783 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 789 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698