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

Side by Side Diff: android_webview/browser/aw_permission_manager.cc

Issue 1164073005: Allow script to request durable storage permission (chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix conflicts after midi constant permission landed Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "android_webview/browser/aw_permission_manager.h" 5 #include "android_webview/browser/aw_permission_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "android_webview/browser/aw_browser_permission_request_delegate.h" 9 #include "android_webview/browser/aw_browser_permission_request_delegate.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 origin, embedding_origin)); 203 origin, embedding_origin));
204 break; 204 break;
205 case PermissionType::MIDI_SYSEX: 205 case PermissionType::MIDI_SYSEX:
206 delegate->RequestMIDISysexPermission( 206 delegate->RequestMIDISysexPermission(
207 origin, base::Bind(&CallbackPermisisonStatusWrapper, 207 origin, base::Bind(&CallbackPermisisonStatusWrapper,
208 result_cache_->GetWeakPtr(), callback, permission, 208 result_cache_->GetWeakPtr(), callback, permission,
209 origin, embedding_origin)); 209 origin, embedding_origin));
210 break; 210 break;
211 case PermissionType::NOTIFICATIONS: 211 case PermissionType::NOTIFICATIONS:
212 case PermissionType::PUSH_MESSAGING: 212 case PermissionType::PUSH_MESSAGING:
213 case PermissionType::DURABLE_STORAGE:
213 NOTIMPLEMENTED() << "RequestPermission is not implemented for " 214 NOTIMPLEMENTED() << "RequestPermission is not implemented for "
214 << static_cast<int>(permission); 215 << static_cast<int>(permission);
215 callback.Run(content::PERMISSION_STATUS_DENIED); 216 callback.Run(content::PERMISSION_STATUS_DENIED);
216 break; 217 break;
217 case PermissionType::MIDI: 218 case PermissionType::MIDI:
218 callback.Run(content::PERMISSION_STATUS_GRANTED); 219 callback.Run(content::PERMISSION_STATUS_GRANTED);
219 break; 220 break;
220 case PermissionType::NUM: 221 case PermissionType::NUM:
221 NOTREACHED() << "PermissionType::NUM was not expected here."; 222 NOTREACHED() << "PermissionType::NUM was not expected here.";
222 callback.Run(content::PERMISSION_STATUS_DENIED); 223 callback.Run(content::PERMISSION_STATUS_DENIED);
(...skipping 27 matching lines...) Expand all
250 delegate->CancelGeolocationPermissionRequests(origin); 251 delegate->CancelGeolocationPermissionRequests(origin);
251 break; 252 break;
252 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: 253 case PermissionType::PROTECTED_MEDIA_IDENTIFIER:
253 delegate->CancelProtectedMediaIdentifierPermissionRequests(origin); 254 delegate->CancelProtectedMediaIdentifierPermissionRequests(origin);
254 break; 255 break;
255 case PermissionType::MIDI_SYSEX: 256 case PermissionType::MIDI_SYSEX:
256 delegate->CancelMIDISysexPermissionRequests(origin); 257 delegate->CancelMIDISysexPermissionRequests(origin);
257 break; 258 break;
258 case PermissionType::NOTIFICATIONS: 259 case PermissionType::NOTIFICATIONS:
259 case PermissionType::PUSH_MESSAGING: 260 case PermissionType::PUSH_MESSAGING:
261 case PermissionType::DURABLE_STORAGE:
260 NOTIMPLEMENTED() << "CancelPermission not implemented for " 262 NOTIMPLEMENTED() << "CancelPermission not implemented for "
261 << static_cast<int>(permission); 263 << static_cast<int>(permission);
262 break; 264 break;
263 case PermissionType::MIDI: 265 case PermissionType::MIDI:
264 // There is nothing to cancel so this is simply ignored. 266 // There is nothing to cancel so this is simply ignored.
265 break; 267 break;
266 case PermissionType::NUM: 268 case PermissionType::NUM:
267 NOTREACHED() << "PermissionType::NUM was not expected here."; 269 NOTREACHED() << "PermissionType::NUM was not expected here.";
268 break; 270 break;
269 } 271 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 const GURL& embedding_origin, 304 const GURL& embedding_origin,
303 const base::Callback<void(PermissionStatus)>& callback) { 305 const base::Callback<void(PermissionStatus)>& callback) {
304 return -1; 306 return -1;
305 } 307 }
306 308
307 void AwPermissionManager::UnsubscribePermissionStatusChange( 309 void AwPermissionManager::UnsubscribePermissionStatusChange(
308 int subscription_id) { 310 int subscription_id) {
309 } 311 }
310 312
311 } // namespace android_webview 313 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698