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

Unified Diff: Source/modules/permissions/Permissions.cpp

Issue 1054663002: Implement Permission change observing in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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: Source/modules/permissions/Permissions.cpp
diff --git a/Source/modules/permissions/Permissions.cpp b/Source/modules/permissions/Permissions.cpp
index 0fdb4d44b5e335c9a03b5f11e047e8eb1c72a1aa..b4ee0cffdf52c2a97e9bf107a228e8053b7af0e7 100644
--- a/Source/modules/permissions/Permissions.cpp
+++ b/Source/modules/permissions/Permissions.cpp
@@ -66,7 +66,7 @@ ScriptPromise Permissions::query(ScriptState* scriptState, const ScriptValue& ra
PushPermissionDescriptor pushPermission = NativeValueTraits<PushPermissionDescriptor>::nativeValue(scriptState->isolate(), rawPermission.v8Value(), exceptionState);
// The only "userVisible" push is supported for now.
Miguel Garcia 2015/04/01 17:41:51 nit: remove "The"
mlamouri (slow - plz ping) 2015/04/01 17:53:10 Done.
mlamouri (slow - plz ping) 2015/04/01 17:53:10 Done.
if (!pushPermission.userVisible()) {
- resolver->resolve(new PermissionStatus(scriptState->executionContext(), WebPermissionStatusDenied));
+ resolver->resolve(PermissionStatus::create(scriptState->executionContext(), WebPermissionStatusDenied, WebPermissionTypePush));
return promise;
}
type = WebPermissionTypePushNotifications;
Miguel Garcia 2015/04/01 17:41:51 so we still have WebPermissionTypePushNotification
mlamouri (slow - plz ping) 2015/04/01 17:53:11 Renaming it will require tree-sided CL because it
@@ -74,7 +74,7 @@ ScriptPromise Permissions::query(ScriptState* scriptState, const ScriptValue& ra
MidiPermissionDescriptor midiPermission = NativeValueTraits<MidiPermissionDescriptor>::nativeValue(scriptState->isolate(), rawPermission.v8Value(), exceptionState);
// Only sysex usage requires a permission for now.
if (!midiPermission.sysex()) {
- resolver->resolve(new PermissionStatus(scriptState->executionContext(), WebPermissionStatusGranted));
+ resolver->resolve(PermissionStatus::create(scriptState->executionContext(), WebPermissionStatusGranted, WebPermissionTypeMidi));
return promise;
}
type = WebPermissionTypeMidiSysEx;

Powered by Google App Engine
This is Rietveld 408576698