| OLD | NEW |
| 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/app_modal/chrome_javascript_native_dialog_factory.h" | 5 #include "chrome/browser/ui/app_modal/chrome_javascript_native_dialog_factory.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" |
| 7 #include "components/app_modal/javascript_dialog_manager.h" | 9 #include "components/app_modal/javascript_dialog_manager.h" |
| 8 #include "components/app_modal/javascript_native_dialog_factory.h" | 10 #include "components/app_modal/javascript_native_dialog_factory.h" |
| 9 #include "components/constrained_window/constrained_window_views.h" | 11 #include "components/constrained_window/constrained_window_views.h" |
| 10 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 11 #include "content/public/browser/web_contents_delegate.h" | 13 #include "content/public/browser/web_contents_delegate.h" |
| 12 | 14 |
| 13 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 15 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 14 #include "chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.h" | 16 #include "chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.h" |
| 15 #else | 17 #else |
| 16 #include "chrome/browser/ui/blocked_content/app_modal_dialog_helper.h" | 18 #include "chrome/browser/ui/blocked_content/app_modal_dialog_helper.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 DISALLOW_COPY_AND_ASSIGN(ChromeJavaScriptNativeDialogViewsFactory); | 77 DISALLOW_COPY_AND_ASSIGN(ChromeJavaScriptNativeDialogViewsFactory); |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace | 80 } // namespace |
| 79 | 81 |
| 80 void InstallChromeJavaScriptNativeDialogFactory() { | 82 void InstallChromeJavaScriptNativeDialogFactory() { |
| 81 app_modal::JavaScriptDialogManager::GetInstance()-> | 83 app_modal::JavaScriptDialogManager::GetInstance()-> |
| 82 SetNativeDialogFactory( | 84 SetNativeDialogFactory( |
| 83 make_scoped_ptr(new ChromeJavaScriptNativeDialogViewsFactory)); | 85 make_scoped_ptr(new ChromeJavaScriptNativeDialogViewsFactory)); |
| 84 } | 86 } |
| OLD | NEW |