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

Unified Diff: Source/modules/webmidi/MIDIOutput.cpp

Issue 910983005: Decouple performance() from LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase + feedback Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/mediasource/VideoPlaybackQuality.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIOutput.cpp
diff --git a/Source/modules/webmidi/MIDIOutput.cpp b/Source/modules/webmidi/MIDIOutput.cpp
index 4a10e4ca676c455dc76d156aa25f277de8df8551..1e49932d43b83c416a9111ff25a91ba069b58b97 100644
--- a/Source/modules/webmidi/MIDIOutput.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -35,6 +35,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/frame/LocalDOMWindow.h"
+#include "core/timing/DOMWindowPerformance.h"
#include "core/timing/Performance.h"
#include "modules/webmidi/MIDIAccess.h"
@@ -44,8 +45,8 @@ namespace {
double now(ExecutionContext* context)
{
- LocalDOMWindow* window = context ? context->executingWindow() : 0;
- Performance* performance = window ? window->performance() : 0;
+ LocalDOMWindow* window = context ? context->executingWindow() : nullptr;
+ Performance* performance = window ? DOMWindowPerformance::performance(*window) : nullptr;
return performance ? performance->now() : 0.0;
}
« no previous file with comments | « Source/modules/mediasource/VideoPlaybackQuality.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698