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

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: 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
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 ui::AXRole DialogDelegate::GetAccessibleWindowRole() const { 232 ui::AXRole DialogDelegate::GetAccessibleWindowRole() const {
233 return ui::AX_ROLE_DIALOG; 233 return ui::AX_ROLE_DIALOG;
234 } 234 }
235 235
236 //////////////////////////////////////////////////////////////////////////////// 236 ////////////////////////////////////////////////////////////////////////////////
237 // DialogDelegateView: 237 // DialogDelegateView:
238 238
239 DialogDelegateView::DialogDelegateView() { 239 DialogDelegateView::DialogDelegateView() {
240 // A WidgetDelegate should be deleted on DeleteDelegate. 240 // A WidgetDelegate should be deleted on DeleteDelegate.
241 set_owned_by_client(); 241 set_owned_by_client();
242 UMA_HISTOGRAM_BOOLEAN("Dialog.DelegateView.Creation", true);
242 } 243 }
243 244
244 DialogDelegateView::~DialogDelegateView() {} 245 DialogDelegateView::~DialogDelegateView() {}
245 246
246 void DialogDelegateView::DeleteDelegate() { 247 void DialogDelegateView::DeleteDelegate() {
247 delete this; 248 delete this;
248 } 249 }
249 250
250 Widget* DialogDelegateView::GetWidget() { 251 Widget* DialogDelegateView::GetWidget() {
251 return View::GetWidget(); 252 return View::GetWidget();
(...skipping 12 matching lines...) Expand all
264 node_data->role = ui::AX_ROLE_DIALOG; 265 node_data->role = ui::AX_ROLE_DIALOG;
265 } 266 }
266 267
267 void DialogDelegateView::ViewHierarchyChanged( 268 void DialogDelegateView::ViewHierarchyChanged(
268 const ViewHierarchyChangedDetails& details) { 269 const ViewHierarchyChangedDetails& details) {
269 if (details.is_add && details.child == this && GetWidget()) 270 if (details.is_add && details.child == this && GetWidget())
270 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 271 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
271 } 272 }
272 273
273 } // namespace views 274 } // namespace views
OLDNEW
« tools/metrics/histograms/histograms.xml ('K') | « 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