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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp

Issue 2850983002: Remove UserGestureUtilizedCallback, it's unused outside of tests (Closed)
Patch Set: Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 decode_audio_resolvers_.clear(); 842 decode_audio_resolvers_.clear();
843 } 843 }
844 844
845 void BaseAudioContext::MaybeUnlockUserGesture() { 845 void BaseAudioContext::MaybeUnlockUserGesture() {
846 if (!user_gesture_required_ || !UserGestureIndicator::ProcessingUserGesture()) 846 if (!user_gesture_required_ || !UserGestureIndicator::ProcessingUserGesture())
847 return; 847 return;
848 848
849 DCHECK(!autoplay_status_.has_value() || 849 DCHECK(!autoplay_status_.has_value() ||
850 autoplay_status_ != AutoplayStatus::kAutoplayStatusSucceeded); 850 autoplay_status_ != AutoplayStatus::kAutoplayStatusSucceeded);
851 851
852 UserGestureIndicator::UtilizeUserGesture();
853 user_gesture_required_ = false; 852 user_gesture_required_ = false;
854 autoplay_status_ = AutoplayStatus::kAutoplayStatusSucceeded; 853 autoplay_status_ = AutoplayStatus::kAutoplayStatusSucceeded;
855 } 854 }
856 855
857 bool BaseAudioContext::IsAllowedToStart() const { 856 bool BaseAudioContext::IsAllowedToStart() const {
858 if (!user_gesture_required_) 857 if (!user_gesture_required_)
859 return true; 858 return true;
860 859
861 ToDocument(GetExecutionContext()) 860 ToDocument(GetExecutionContext())
862 ->AddConsoleMessage(ConsoleMessage::Create( 861 ->AddConsoleMessage(ConsoleMessage::Create(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 } 937 }
939 938
940 SecurityOrigin* BaseAudioContext::GetSecurityOrigin() const { 939 SecurityOrigin* BaseAudioContext::GetSecurityOrigin() const {
941 if (GetExecutionContext()) 940 if (GetExecutionContext())
942 return GetExecutionContext()->GetSecurityOrigin(); 941 return GetExecutionContext()->GetSecurityOrigin();
943 942
944 return nullptr; 943 return nullptr;
945 } 944 }
946 945
947 } // namespace blink 946 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRDisplay.cpp ('k') | third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698