Chromium Code Reviews| Index: chrome/browser/content_settings/permission_queue_controller.cc |
| diff --git a/chrome/browser/content_settings/permission_queue_controller.cc b/chrome/browser/content_settings/permission_queue_controller.cc |
| index 6b1aa4e1b24685e2638d2c09732b1a818dcd91ad..9a6e7653a8c96e8eb9afbc589d10f00b61038d96 100644 |
| --- a/chrome/browser/content_settings/permission_queue_controller.cc |
| +++ b/chrome/browser/content_settings/permission_queue_controller.cc |
| @@ -42,6 +42,7 @@ class PermissionQueueController::PendingInfobarRequest { |
| const PermissionRequestID& id, |
| const GURL& requesting_frame, |
| const GURL& embedder, |
| + const std::string accept_button_label, |
| PermissionDecidedCallback callback); |
| ~PendingInfobarRequest(); |
| @@ -64,6 +65,7 @@ class PermissionQueueController::PendingInfobarRequest { |
| GURL embedder_; |
| PermissionDecidedCallback callback_; |
| InfoBar* infobar_; |
| + std::string accept_button_label_; |
|
bulach
2014/02/14 11:36:48
nit: move this after embedded, to keep the same or
acleung1
2014/02/21 21:18:01
Done.
|
| // Purposefully do not disable copying, as this is stored in STL containers. |
| }; |
| @@ -73,13 +75,15 @@ PermissionQueueController::PendingInfobarRequest::PendingInfobarRequest( |
| const PermissionRequestID& id, |
| const GURL& requesting_frame, |
| const GURL& embedder, |
| + const std::string accept_button_label, |
| PermissionDecidedCallback callback) |
| : type_(type), |
| id_(id), |
| requesting_frame_(requesting_frame), |
| embedder_(embedder), |
| callback_(callback), |
| - infobar_(NULL) { |
| + infobar_(NULL), |
| + accept_button_label_(accept_button_label) { |
| } |
| PermissionQueueController::PendingInfobarRequest::~PendingInfobarRequest() { |
| @@ -106,7 +110,7 @@ void PermissionQueueController::PendingInfobarRequest::CreateInfoBar( |
| case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| infobar_ = GeolocationInfoBarDelegate::Create( |
| GetInfoBarService(id_), controller, id_, requesting_frame_, |
| - display_languages); |
| + display_languages, accept_button_label_); |
| break; |
| case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
| infobar_ = MidiPermissionInfoBarDelegate::Create( |
| @@ -145,6 +149,7 @@ void PermissionQueueController::CreateInfoBarRequest( |
| const PermissionRequestID& id, |
| const GURL& requesting_frame, |
| const GURL& embedder, |
| + const std::string accept_button_label, |
| PermissionDecidedCallback callback) { |
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| @@ -155,7 +160,8 @@ void PermissionQueueController::CreateInfoBarRequest( |
| DCHECK(!i->id().Equals(id)); |
| pending_infobar_requests_.push_back(PendingInfobarRequest( |
| - type_, id, requesting_frame, embedder, callback)); |
| + type_, id, requesting_frame, embedder, |
| + accept_button_label, callback)); |
| if (!AlreadyShowingInfoBarForTab(id)) |
| ShowQueuedInfoBarForTab(id); |
| } |