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

Unified Diff: chrome/browser/ui/views/extensions/chooser_dialog_view.cc

Issue 2390823005: Update device permissions dialog ui for Chrome apps and extensions (Closed)
Patch Set: address more comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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());
+}
« no previous file with comments | « chrome/browser/ui/views/chooser_content_view.cc ('k') | chrome/browser/ui/views/extensions/device_permissions_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698