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

Unified Diff: chrome/browser/geolocation/chrome_geolocation_permission_context.cc

Issue 176053002: [WebsiteSettings] Change permission bubble API to adapt to new mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/geolocation/chrome_geolocation_permission_context.cc
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
index e414cb3045b5e59679755d18bb85ffc1ca786544..99d73f11cbb490913044383db7e920294ec72a55 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
@@ -28,6 +28,7 @@
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/extension.h"
#include "grit/generated_resources.h"
+#include "grit/theme_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -45,10 +46,10 @@ class GeolocationPermissionRequest : public PermissionBubbleRequest {
virtual ~GeolocationPermissionRequest();
// PermissionBubbleDelegate:
+ virtual int GetIconID() const OVERRIDE;
virtual base::string16 GetMessageText() const OVERRIDE;
virtual base::string16 GetMessageTextFragment() const OVERRIDE;
- virtual base::string16 GetAlternateAcceptButtonText() const OVERRIDE;
- virtual base::string16 GetAlternateDenyButtonText() const OVERRIDE;
+ virtual bool HasUserGesture() const OVERRIDE;
virtual void PermissionGranted() OVERRIDE;
virtual void PermissionDenied() OVERRIDE;
virtual void Cancelled() OVERRIDE;
@@ -76,6 +77,10 @@ GeolocationPermissionRequest::GeolocationPermissionRequest(
GeolocationPermissionRequest::~GeolocationPermissionRequest() {}
+int GeolocationPermissionRequest::GetIconID() const {
+ return IDR_GEOLOCATION_INFOBAR_ICON;
+}
+
base::string16 GeolocationPermissionRequest::GetMessageText() const {
return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION,
net::FormatUrl(requesting_frame_, display_languages_));
@@ -85,14 +90,9 @@ base::string16 GeolocationPermissionRequest::GetMessageTextFragment() const {
return l10n_util::GetStringUTF16(IDS_GEOLOCATION_INFOBAR_PERMISSION_FRAGMENT);
}
-base::string16
-GeolocationPermissionRequest::GetAlternateAcceptButtonText() const {
- return l10n_util::GetStringUTF16(IDS_GEOLOCATION_ALLOW_BUTTON);
-}
-
-base::string16
-GeolocationPermissionRequest::GetAlternateDenyButtonText() const {
- return l10n_util::GetStringUTF16(IDS_GEOLOCATION_DENY_BUTTON);
+bool GeolocationPermissionRequest::HasUserGesture() const {
+ // TODO(gbillock): plumb this through from GeolocationDispatcher.
+ return false;
}
void GeolocationPermissionRequest::PermissionGranted() {
@@ -197,6 +197,7 @@ void ChromeGeolocationPermissionContext::CancelGeolocationPermissionRequest(
int render_view_id,
int bridge_id,
const GURL& requesting_frame) {
+ // TODO(gbillock): cancel permission bubble request.
CancelPendingInfobarRequest(PermissionRequestID(
render_process_id, render_view_id, bridge_id, 0));
}

Powered by Google App Engine
This is Rietveld 408576698