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

Side by Side Diff: chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.cc

Issue 2881683002: Log the creation of several more dialog box types. (Closed)
Patch Set: Fix alphabetization errors. 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.h" 5 #include "chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.h"
6 6
7 #include "chrome/browser/ui/blocked_content/app_modal_dialog_helper.h" 7 #include "chrome/browser/ui/blocked_content/app_modal_dialog_helper.h"
8 #include "chrome/browser/ui/browser_dialogs.h"
8 #include "chrome/browser/ui/views/javascript_app_modal_event_blocker_x11.h" 9 #include "chrome/browser/ui/views/javascript_app_modal_event_blocker_x11.h"
9 #include "components/app_modal/javascript_app_modal_dialog.h" 10 #include "components/app_modal/javascript_app_modal_dialog.h"
10 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
11 12
12 JavaScriptAppModalDialogViewsX11::JavaScriptAppModalDialogViewsX11( 13 JavaScriptAppModalDialogViewsX11::JavaScriptAppModalDialogViewsX11(
13 app_modal::JavaScriptAppModalDialog* parent) 14 app_modal::JavaScriptAppModalDialog* parent)
14 : app_modal::JavaScriptAppModalDialogViews(parent), 15 : app_modal::JavaScriptAppModalDialogViews(parent),
15 helper_(new AppModalDialogHelper(parent->web_contents())) { 16 helper_(new AppModalDialogHelper(parent->web_contents())) {
17 chrome::RecordDialogCreation(
18 chrome::DialogIdentifier::JAVA_SCRIPT_APP_MODAL_X11);
16 } 19 }
17 20
18 JavaScriptAppModalDialogViewsX11::~JavaScriptAppModalDialogViewsX11() { 21 JavaScriptAppModalDialogViewsX11::~JavaScriptAppModalDialogViewsX11() {
19 } 22 }
20 23
21 void JavaScriptAppModalDialogViewsX11::ShowAppModalDialog() { 24 void JavaScriptAppModalDialogViewsX11::ShowAppModalDialog() {
22 // BrowserView::CanActivate() ensures that other browser windows cannot be 25 // BrowserView::CanActivate() ensures that other browser windows cannot be
23 // activated for long while the dialog is visible. Block events to other 26 // activated for long while the dialog is visible. Block events to other
24 // browser windows so that the user cannot interact with other browser windows 27 // browser windows so that the user cannot interact with other browser windows
25 // in the short time that the other browser windows are active. This hack is 28 // in the short time that the other browser windows are active. This hack is
26 // unnecessary on Windows and Chrome OS. 29 // unnecessary on Windows and Chrome OS.
27 // TODO(pkotwicz): Find a better way of doing this and remove this hack. 30 // TODO(pkotwicz): Find a better way of doing this and remove this hack.
28 if (!event_blocker_x11_.get()) { 31 if (!event_blocker_x11_.get()) {
29 event_blocker_x11_.reset( 32 event_blocker_x11_.reset(
30 new JavascriptAppModalEventBlockerX11(GetWidget()->GetNativeView())); 33 new JavascriptAppModalEventBlockerX11(GetWidget()->GetNativeView()));
31 } 34 }
32 GetWidget()->Show(); 35 GetWidget()->Show();
33 } 36 }
34 37
35 void JavaScriptAppModalDialogViewsX11::WindowClosing() { 38 void JavaScriptAppModalDialogViewsX11::WindowClosing() {
36 event_blocker_x11_.reset(); 39 event_blocker_x11_.reset();
37 } 40 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/intent_picker_bubble_view.cc ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698