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

Unified Diff: ui/views/bubble/bubble_dialog_delegate.cc

Issue 1809933003: Port BubbleDelegate tests to BubbleDialogDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw review Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | ui/views/bubble/bubble_dialog_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 4fbc7032afc35bd06961cdfb2cf88d284ff8f29c..9673891dc394fdbb5777e4cb2bb66071b5299755 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -123,14 +123,6 @@ const char* BubbleDialogDelegateView::GetClassName() const {
return kViewClassName;
}
-void BubbleDialogDelegateView::OnWidgetClosing(Widget* widget) {
- DCHECK(GetBubbleFrameView());
- if (widget == GetWidget() && close_reason_ == CloseReason::UNKNOWN &&
- GetBubbleFrameView()->close_button_clicked()) {
- close_reason_ = CloseReason::CLOSE_BUTTON;
- }
-}
-
void BubbleDialogDelegateView::OnWidgetDestroying(Widget* widget) {
if (anchor_widget() == widget)
SetAnchorView(NULL);
@@ -155,11 +147,8 @@ void BubbleDialogDelegateView::OnWidgetVisibilityChanged(Widget* widget,
void BubbleDialogDelegateView::OnWidgetActivationChanged(Widget* widget,
bool active) {
- if (close_on_deactivate() && widget == GetWidget() && !active) {
- if (close_reason_ == CloseReason::UNKNOWN)
- close_reason_ = CloseReason::DEACTIVATION;
+ if (close_on_deactivate() && widget == GetWidget() && !active)
GetWidget()->Close();
- }
}
void BubbleDialogDelegateView::OnWidgetBoundsChanged(
@@ -225,8 +214,7 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view,
accept_events_(true),
border_accepts_events_(true),
adjust_if_offscreen_(true),
- parent_window_(NULL),
- close_reason_(CloseReason::UNKNOWN) {
+ parent_window_(NULL) {
if (anchor_view)
SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme());
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | ui/views/bubble/bubble_dialog_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698