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

Side by Side Diff: ui/views/window/dialog_delegate.cc

Issue 2867683002: Log the creation of dialog boxes using DialogDelegateView and BubbleDialogDelegateView. (Closed)
Patch Set: Expand descriptions. Created 3 years, 7 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_dialog_delegate.cc ('k') | no next file » | 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/window/dialog_delegate.h" 5 #include "ui/views/window/dialog_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 ui::AXRole DialogDelegate::GetAccessibleWindowRole() const { 236 ui::AXRole DialogDelegate::GetAccessibleWindowRole() const {
237 return ui::AX_ROLE_DIALOG; 237 return ui::AX_ROLE_DIALOG;
238 } 238 }
239 239
240 //////////////////////////////////////////////////////////////////////////////// 240 ////////////////////////////////////////////////////////////////////////////////
241 // DialogDelegateView: 241 // DialogDelegateView:
242 242
243 DialogDelegateView::DialogDelegateView() { 243 DialogDelegateView::DialogDelegateView() {
244 // A WidgetDelegate should be deleted on DeleteDelegate. 244 // A WidgetDelegate should be deleted on DeleteDelegate.
245 set_owned_by_client(); 245 set_owned_by_client();
246 UMA_HISTOGRAM_BOOLEAN("Dialog.DialogDelegateView.Create", true);
246 } 247 }
247 248
248 DialogDelegateView::~DialogDelegateView() {} 249 DialogDelegateView::~DialogDelegateView() {}
249 250
250 void DialogDelegateView::DeleteDelegate() { 251 void DialogDelegateView::DeleteDelegate() {
251 delete this; 252 delete this;
252 } 253 }
253 254
254 Widget* DialogDelegateView::GetWidget() { 255 Widget* DialogDelegateView::GetWidget() {
255 return View::GetWidget(); 256 return View::GetWidget();
(...skipping 12 matching lines...) Expand all
268 node_data->role = ui::AX_ROLE_DIALOG; 269 node_data->role = ui::AX_ROLE_DIALOG;
269 } 270 }
270 271
271 void DialogDelegateView::ViewHierarchyChanged( 272 void DialogDelegateView::ViewHierarchyChanged(
272 const ViewHierarchyChangedDetails& details) { 273 const ViewHierarchyChangedDetails& details) {
273 if (details.is_add && details.child == this && GetWidget()) 274 if (details.is_add && details.child == this && GetWidget())
274 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 275 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
275 } 276 }
276 277
277 } // namespace views 278 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698