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

Unified Diff: chrome/browser/ui/website_settings/chooser_bubble_controller.cc

Issue 1892293003: Display origin url on the chooser permission dialog title (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comment Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/website_settings/chooser_bubble_controller.cc
diff --git a/chrome/browser/ui/website_settings/chooser_bubble_controller.cc b/chrome/browser/ui/website_settings/chooser_bubble_controller.cc
index 05113f0d6c2571cb833f93cf3d60a5da7b863d18..987835f7f3940237aa3efe3398fa3554136c7efe 100644
--- a/chrome/browser/ui/website_settings/chooser_bubble_controller.cc
+++ b/chrome/browser/ui/website_settings/chooser_bubble_controller.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/net/referrer.h"
#include "chrome/browser/ui/browser_finder.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
ChooserBubbleController::ChooserBubbleController(
@@ -16,6 +17,11 @@ ChooserBubbleController::ChooserBubbleController(
ChooserBubbleController::~ChooserBubbleController() {}
+GURL ChooserBubbleController::GetOriginUrl() const {
+ return const_cast<content::RenderFrameHost*>(owning_frame_)
palmer 2016/04/18 18:28:10 Is this const_cast necessary? If so, why? I think
juncai 2016/04/18 19:43:24 Yes, it is necessary because GetLastCommittedOrigi
+ ->GetLastCommittedURL();
palmer 2016/04/18 18:28:10 Try GetLastCommittedOrigin.
juncai 2016/04/18 19:43:24 Done.
+}
+
void ChooserBubbleController::OpenHelpCenterUrl() const {
browser_->OpenURL(content::OpenURLParams(
GetHelpCenterUrl(), content::Referrer(), NEW_FOREGROUND_TAB,

Powered by Google App Engine
This is Rietveld 408576698