Index: components/app_modal_dialogs/views/javascript_app_modal_dialog_views.cc |
diff --git a/chrome/browser/ui/views/javascript_app_modal_dialog_views.cc b/components/app_modal_dialogs/views/javascript_app_modal_dialog_views.cc |
similarity index 84% |
rename from chrome/browser/ui/views/javascript_app_modal_dialog_views.cc |
rename to components/app_modal_dialogs/views/javascript_app_modal_dialog_views.cc |
index 6ce5fcf741bc0ae990e7943fab6e0c47f16f3137..a29c4031bf74b63a2ac050a2e4bd1a324dbce4ef 100644 |
--- a/chrome/browser/ui/views/javascript_app_modal_dialog_views.cc |
+++ b/components/app_modal_dialogs/views/javascript_app_modal_dialog_views.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/ui/views/javascript_app_modal_dialog_views.h" |
+#include "components/app_modal_dialogs/views/javascript_app_modal_dialog_views.h" |
#include "base/strings/utf_string_conversions.h" |
#include "components/app_modal_dialogs/javascript_app_modal_dialog.h" |
@@ -15,10 +15,6 @@ |
#include "ui/views/widget/widget.h" |
#include "ui/views/window/dialog_client_view.h" |
-#if defined(USE_X11) && !defined(OS_CHROMEOS) |
-#include "chrome/browser/ui/views/javascript_app_modal_event_blocker_x11.h" |
-#endif |
- |
//////////////////////////////////////////////////////////////////////////////// |
// JavaScriptAppModalDialogViews, public: |
@@ -55,19 +51,6 @@ int JavaScriptAppModalDialogViews::GetAppModalDialogButtons() const { |
} |
void JavaScriptAppModalDialogViews::ShowAppModalDialog() { |
-#if defined(USE_X11) && !defined(OS_CHROMEOS) |
- // BrowserView::CanActivate() ensures that other browser windows cannot be |
- // activated for long while the dialog is visible. Block events to other |
- // browser windows so that the user cannot interact with other browser windows |
- // in the short time that the other browser windows are active. This hack is |
- // unnecessary on Windows and Chrome OS. |
- // TODO(pkotwicz): Find a better way of doing this and remove this hack. |
- if (!event_blocker_x11_.get()) { |
- event_blocker_x11_.reset( |
- new JavascriptAppModalEventBlockerX11(GetWidget()->GetNativeView())); |
- } |
-#endif |
- |
GetWidget()->Show(); |
} |
@@ -107,12 +90,6 @@ base::string16 JavaScriptAppModalDialogViews::GetWindowTitle() const { |
return parent_->title(); |
} |
-void JavaScriptAppModalDialogViews::WindowClosing() { |
-#if defined(USE_X11) && !defined(OS_CHROMEOS) |
- event_blocker_x11_.reset(); |
-#endif |
-} |
- |
void JavaScriptAppModalDialogViews::DeleteDelegate() { |
delete this; |
} |
@@ -175,6 +152,7 @@ views::View* JavaScriptAppModalDialogViews::GetInitiallyFocusedView() { |
return views::DialogDelegate::GetInitiallyFocusedView(); |
} |
+/* |
//////////////////////////////////////////////////////////////////////////////// |
// NativeAppModalDialog, public: |
@@ -186,3 +164,4 @@ NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( |
CreateBrowserModalDialogViews(d, parent_window); |
return d; |
} |
+*/ |
Avi (use Gerrit)
2014/10/29 17:40:57
Don't commit commented-out code.
oshima
2014/10/31 15:54:45
Done.
|