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

Side by Side Diff: ui/views/bubble/bubble_delegate.cc

Issue 1518543002: Adds MD ink ripple animations to buttons within location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds MD ink ripple animations to buttons within location bar (fixed test build) Created 4 years, 10 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
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 #include "ui/views/bubble/bubble_delegate.h" 5 #include "ui/views/bubble/bubble_delegate.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/accessibility/ax_view_state.h" 8 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/color_utils.h" 10 #include "ui/gfx/color_utils.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const char* BubbleDelegateView::GetClassName() const { 138 const char* BubbleDelegateView::GetClassName() const {
139 return kViewClassName; 139 return kViewClassName;
140 } 140 }
141 141
142 void BubbleDelegateView::OnWidgetClosing(Widget* widget) { 142 void BubbleDelegateView::OnWidgetClosing(Widget* widget) {
143 DCHECK(GetBubbleFrameView()); 143 DCHECK(GetBubbleFrameView());
144 if (widget == GetWidget() && close_reason_ == CloseReason::UNKNOWN && 144 if (widget == GetWidget() && close_reason_ == CloseReason::UNKNOWN &&
145 GetBubbleFrameView()->close_button_clicked()) { 145 GetBubbleFrameView()->close_button_clicked()) {
146 close_reason_ = CloseReason::CLOSE_BUTTON; 146 close_reason_ = CloseReason::CLOSE_BUTTON;
147 } 147 }
148 View* anchor_view = GetAnchorView();
149 if (anchor_view)
150 anchor_view->OnBubbleClosing();
148 } 151 }
149 152
150 void BubbleDelegateView::OnWidgetDestroying(Widget* widget) { 153 void BubbleDelegateView::OnWidgetDestroying(Widget* widget) {
151 if (anchor_widget() == widget) 154 if (anchor_widget() == widget)
152 SetAnchorView(NULL); 155 SetAnchorView(NULL);
153 } 156 }
154 157
155 void BubbleDelegateView::OnWidgetVisibilityChanging(Widget* widget, 158 void BubbleDelegateView::OnWidgetVisibilityChanging(Widget* widget,
156 bool visible) { 159 bool visible) {
157 #if defined(OS_WIN) 160 #if defined(OS_WIN)
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // http://crbug.com/474622 for details. 318 // http://crbug.com/474622 for details.
316 if (widget == GetWidget() && visible) { 319 if (widget == GetWidget() && visible) {
317 ui::AXViewState state; 320 ui::AXViewState state;
318 GetAccessibleState(&state); 321 GetAccessibleState(&state);
319 if (state.role == ui::AX_ROLE_ALERT_DIALOG) 322 if (state.role == ui::AX_ROLE_ALERT_DIALOG)
320 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 323 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
321 } 324 }
322 } 325 }
323 326
324 } // namespace views 327 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698