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

Side by Side Diff: chrome/browser/media/chrome_midi_permission_context.cc

Issue 23345004: Fix Android strict-mode violation in GeoLocation info bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/chrome_midi_permission_context.h" 5 #include "chrome/browser/media/chrome_midi_permission_context.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/content_settings/host_content_settings_map.h" 8 #include "chrome/browser/content_settings/host_content_settings_map.h"
9 #include "chrome/browser/content_settings/permission_queue_controller.h" 9 #include "chrome/browser/content_settings/permission_queue_controller.h"
10 #include "chrome/browser/content_settings/permission_request_id.h" 10 #include "chrome/browser/content_settings/permission_request_id.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 bubble_manager->AddRequest(new MidiPermissionRequest( 189 bubble_manager->AddRequest(new MidiPermissionRequest(
190 this, id, requesting_frame, 190 this, id, requesting_frame,
191 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 191 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
192 callback)); 192 callback));
193 return; 193 return;
194 } 194 }
195 195
196 // TODO(gbillock): Delete this and the infobar delegate when 196 // TODO(gbillock): Delete this and the infobar delegate when
197 // we're using only bubbles. crbug.com/337458 197 // we're using only bubbles. crbug.com/337458
198 GetQueueController()->CreateInfoBarRequest( 198 GetQueueController()->CreateInfoBarRequest(
199 id, requesting_frame, embedder, base::Bind( 199 id, requesting_frame, embedder, "", base::Bind(
no longer working on chromium 2014/02/25 11:21:34 nit, use std::string()
acleung1 2014/02/25 23:15:45 Done.
200 &ChromeMidiPermissionContext::NotifyPermissionSet, 200 &ChromeMidiPermissionContext::NotifyPermissionSet,
201 base::Unretained(this), id, requesting_frame, callback)); 201 base::Unretained(this), id, requesting_frame, callback));
202 } 202 }
203 } 203 }
204 204
205 void ChromeMidiPermissionContext::PermissionDecided( 205 void ChromeMidiPermissionContext::PermissionDecided(
206 const PermissionRequestID& id, 206 const PermissionRequestID& id,
207 const GURL& requesting_frame, 207 const GURL& requesting_frame,
208 const GURL& embedder, 208 const GURL& embedder,
209 const content::BrowserContext::MidiSysExPermissionCallback& callback, 209 const content::BrowserContext::MidiSysExPermissionCallback& callback,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 void ChromeMidiPermissionContext::CancelPendingInfobarRequest( 244 void ChromeMidiPermissionContext::CancelPendingInfobarRequest(
245 const PermissionRequestID& id) { 245 const PermissionRequestID& id) {
246 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 246 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
247 if (shutting_down_) 247 if (shutting_down_)
248 return; 248 return;
249 // TODO(gbillock): Add support for cancellation to permission bubbles. 249 // TODO(gbillock): Add support for cancellation to permission bubbles.
250 GetQueueController()->CancelInfoBarRequest(id); 250 GetQueueController()->CancelInfoBarRequest(id);
251 } 251 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698