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

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: . 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 unified diff | Download patch
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/bubble/bubble_dialog_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/bubble/bubble_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698