Index: chrome/browser/ui/views/extensions/chooser_dialog_view.cc |
diff --git a/chrome/browser/ui/views/extensions/chooser_dialog_view.cc b/chrome/browser/ui/views/extensions/chooser_dialog_view.cc |
index ed79e648a9e1f9aaa11ad1e0d048289288dfbf5a..f0c0522cdeb17381aa7c26d189775c4becb47ffd 100644 |
--- a/chrome/browser/ui/views/extensions/chooser_dialog_view.cc |
+++ b/chrome/browser/ui/views/extensions/chooser_dialog_view.cc |
@@ -5,8 +5,11 @@ |
#include "chrome/browser/ui/views/extensions/chooser_dialog_view.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/threading/thread_task_runner_handle.h" |
#include "chrome/browser/chooser_controller/chooser_controller.h" |
+#include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" |
#include "chrome/browser/extensions/chrome_extension_chooser_dialog.h" |
+#include "chrome/browser/extensions/device_permissions_dialog_controller.h" |
#include "chrome/browser/ui/views/chooser_content_view.h" |
#include "components/constrained_window/constrained_window_views.h" |
#include "components/web_modal/web_contents_modal_dialog_manager.h" |
@@ -130,3 +133,14 @@ void ChromeExtensionChooserDialog::ShowDialogImpl( |
new ChooserDialogView(std::move(chooser_controller)), web_contents_); |
} |
} |
+ |
+void ChromeDevicePermissionsPrompt::ShowDialogViews() { |
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
+ |
+ std::unique_ptr<ChooserController> chooser_controller( |
+ new DevicePermissionsDialogController(web_contents()->GetMainFrame(), |
+ prompt())); |
+ |
+ constrained_window::ShowWebModalDialogViews( |
+ new ChooserDialogView(std::move(chooser_controller)), web_contents()); |
+} |