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

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

Issue 1717453003: Introduce BubbleDialogDelegateView, which extends DialogDelegateView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative ps 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 anchor_rect_ = GetAnchorView()->GetBoundsInScreen(); 200 anchor_rect_ = GetAnchorView()->GetBoundsInScreen();
201 anchor_rect_.Inset(anchor_view_insets_); 201 anchor_rect_.Inset(anchor_view_insets_);
202 return anchor_rect_; 202 return anchor_rect_;
203 } 203 }
204 204
205 void BubbleDelegateView::OnBeforeBubbleWidgetInit(Widget::InitParams* params, 205 void BubbleDelegateView::OnBeforeBubbleWidgetInit(Widget::InitParams* params,
206 Widget* widget) const { 206 Widget* widget) const {
207 } 207 }
208 208
209 scoped_ptr<View> BubbleDelegateView::CreateFootnoteView() { 209 View* BubbleDelegateView::CreateFootnoteView() {
210 return nullptr; 210 return nullptr;
211 } 211 }
212 212
213 void BubbleDelegateView::UseCompactMargins() { 213 void BubbleDelegateView::UseCompactMargins() {
214 const int kCompactMargin = 6; 214 const int kCompactMargin = 6;
215 margins_.Set(kCompactMargin, kCompactMargin, kCompactMargin, kCompactMargin); 215 margins_.Set(kCompactMargin, kCompactMargin, kCompactMargin, kCompactMargin);
216 } 216 }
217 217
218 void BubbleDelegateView::SetAlignment(BubbleBorder::BubbleAlignment alignment) { 218 void BubbleDelegateView::SetAlignment(BubbleBorder::BubbleAlignment alignment) {
219 GetBubbleFrameView()->bubble_border()->set_alignment(alignment); 219 GetBubbleFrameView()->bubble_border()->set_alignment(alignment);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698