| OLD | NEW |
| 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/default_style.h" | 9 #include "ui/base/default_style.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 anchor_rect_ = GetAnchorView()->GetBoundsInScreen(); | 201 anchor_rect_ = GetAnchorView()->GetBoundsInScreen(); |
| 202 anchor_rect_.Inset(anchor_view_insets_); | 202 anchor_rect_.Inset(anchor_view_insets_); |
| 203 return anchor_rect_; | 203 return anchor_rect_; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void BubbleDelegateView::OnBeforeBubbleWidgetInit(Widget::InitParams* params, | 206 void BubbleDelegateView::OnBeforeBubbleWidgetInit(Widget::InitParams* params, |
| 207 Widget* widget) const { | 207 Widget* widget) const { |
| 208 } | 208 } |
| 209 | 209 |
| 210 scoped_ptr<View> BubbleDelegateView::CreateFootnoteView() { | 210 View* BubbleDelegateView::CreateFootnoteView() { |
| 211 return nullptr; | 211 return nullptr; |
| 212 } | 212 } |
| 213 | 213 |
| 214 void BubbleDelegateView::UseCompactMargins() { | 214 void BubbleDelegateView::UseCompactMargins() { |
| 215 const int kCompactMargin = 6; | 215 const int kCompactMargin = 6; |
| 216 margins_.Set(kCompactMargin, kCompactMargin, kCompactMargin, kCompactMargin); | 216 margins_.Set(kCompactMargin, kCompactMargin, kCompactMargin, kCompactMargin); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void BubbleDelegateView::SetAlignment(BubbleBorder::BubbleAlignment alignment) { | 219 void BubbleDelegateView::SetAlignment(BubbleBorder::BubbleAlignment alignment) { |
| 220 GetBubbleFrameView()->bubble_border()->set_alignment(alignment); | 220 GetBubbleFrameView()->bubble_border()->set_alignment(alignment); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 // http://crbug.com/474622 for details. | 329 // http://crbug.com/474622 for details. |
| 330 if (widget == GetWidget() && visible) { | 330 if (widget == GetWidget() && visible) { |
| 331 ui::AXViewState state; | 331 ui::AXViewState state; |
| 332 GetAccessibleState(&state); | 332 GetAccessibleState(&state); |
| 333 if (state.role == ui::AX_ROLE_ALERT_DIALOG) | 333 if (state.role == ui::AX_ROLE_ALERT_DIALOG) |
| 334 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 334 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace views | 338 } // namespace views |
| OLD | NEW |