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

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

Issue 11785030: GeolocationConfirmInfoBarDelegate* -> GeolocationInfoBarDelegate*, for consistency with other infob… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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/geolocation/geolocation_infobar_delegate.cc
===================================================================
--- chrome/browser/geolocation/geolocation_infobar_delegate.cc (working copy)
+++ chrome/browser/geolocation/geolocation_infobar_delegate.cc (working copy)
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/geolocation/geolocation_confirm_infobar_delegate.h"
+#include "chrome/browser/geolocation/geolocation_infobar_delegate.h"
-#include "chrome/browser/api/infobars/infobar_service.h"
#include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/infobars/infobar_service.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
@@ -18,15 +18,15 @@
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_ANDROID)
-#include "chrome/browser/geolocation/geolocation_confirm_infobar_delegate_android.h"
-typedef GeolocationConfirmInfoBarDelegateAndroid DelegateType;
+#include "chrome/browser/geolocation/geolocation_infobar_delegate_android.h"
+typedef GeolocationInfoBarDelegateAndroid DelegateType;
#else
-typedef GeolocationConfirmInfoBarDelegate DelegateType;
+typedef GeolocationInfoBarDelegate DelegateType;
#endif
// static
-InfoBarDelegate* GeolocationConfirmInfoBarDelegate::Create(
+InfoBarDelegate* GeolocationInfoBarDelegate::Create(
InfoBarService* infobar_service,
GeolocationInfoBarQueueController* controller,
const GeolocationPermissionRequestID& id,
@@ -37,7 +37,7 @@
display_languages)));
}
-GeolocationConfirmInfoBarDelegate::GeolocationConfirmInfoBarDelegate(
+GeolocationInfoBarDelegate::GeolocationInfoBarDelegate(
InfoBarService* infobar_service,
GeolocationInfoBarQueueController* controller,
const GeolocationPermissionRequestID& id,
@@ -53,17 +53,16 @@
contents_unique_id_ = committed_entry ? committed_entry->GetUniqueID() : 0;
}
-gfx::Image* GeolocationConfirmInfoBarDelegate::GetIcon() const {
+gfx::Image* GeolocationInfoBarDelegate::GetIcon() const {
return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
IDR_GEOLOCATION_INFOBAR_ICON);
}
-InfoBarDelegate::Type
- GeolocationConfirmInfoBarDelegate::GetInfoBarType() const {
+InfoBarDelegate::Type GeolocationInfoBarDelegate::GetInfoBarType() const {
return PAGE_ACTION_TYPE;
}
-bool GeolocationConfirmInfoBarDelegate::ShouldExpireInternal(
+bool GeolocationInfoBarDelegate::ShouldExpireInternal(
const content::LoadCommittedDetails& details) const {
// This implementation matches InfoBarDelegate::ShouldExpireInternal(), but
// uses the unique ID we set in the constructor instead of that stored in the
@@ -74,39 +73,39 @@
content::PAGE_TRANSITION_RELOAD);
}
-string16 GeolocationConfirmInfoBarDelegate::GetMessageText() const {
+string16 GeolocationInfoBarDelegate::GetMessageText() const {
return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION,
net::FormatUrl(requesting_frame_.GetOrigin(), display_languages_));
}
-string16 GeolocationConfirmInfoBarDelegate::GetButtonLabel(
+string16 GeolocationInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
IDS_GEOLOCATION_ALLOW_BUTTON : IDS_GEOLOCATION_DENY_BUTTON);
}
-void GeolocationConfirmInfoBarDelegate::SetPermission(
- bool update_content_setting, bool allowed) {
+void GeolocationInfoBarDelegate::SetPermission(bool update_content_setting,
+ bool allowed) {
controller_->OnPermissionSet(id_, requesting_frame_,
owner()->GetWebContents()->GetURL(),
update_content_setting, allowed);
}
-bool GeolocationConfirmInfoBarDelegate::Accept() {
+bool GeolocationInfoBarDelegate::Accept() {
SetPermission(true, true);
return true;
}
-bool GeolocationConfirmInfoBarDelegate::Cancel() {
+bool GeolocationInfoBarDelegate::Cancel() {
SetPermission(true, false);
return true;
}
-string16 GeolocationConfirmInfoBarDelegate::GetLinkText() const {
+string16 GeolocationInfoBarDelegate::GetLinkText() const {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
-bool GeolocationConfirmInfoBarDelegate::LinkClicked(
+bool GeolocationInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
const char kGeolocationLearnMoreUrl[] =
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698