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

Side by Side Diff: third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp

Issue 2596443005: Replace DOMWindowProperty in Navigator supplements with ContextClient (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/DOMException.h" 35 #include "core/dom/DOMException.h"
36 #include "core/dom/Document.h" 36 #include "core/dom/Document.h"
37 #include "core/frame/LocalFrame.h" 37 #include "core/frame/LocalFrame.h"
38 #include "core/frame/Navigator.h" 38 #include "core/frame/Navigator.h"
39 #include "core/frame/UseCounter.h" 39 #include "core/frame/UseCounter.h"
40 #include "modules/webmidi/MIDIAccessInitializer.h" 40 #include "modules/webmidi/MIDIAccessInitializer.h"
41 #include "modules/webmidi/MIDIOptions.h" 41 #include "modules/webmidi/MIDIOptions.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 NavigatorWebMIDI::NavigatorWebMIDI(LocalFrame* frame) 45 NavigatorWebMIDI::NavigatorWebMIDI(LocalFrame* frame) : ContextClient(frame) {}
46 : DOMWindowProperty(frame) {}
47 46
48 DEFINE_TRACE(NavigatorWebMIDI) { 47 DEFINE_TRACE(NavigatorWebMIDI) {
49 Supplement<Navigator>::trace(visitor); 48 Supplement<Navigator>::trace(visitor);
50 DOMWindowProperty::trace(visitor); 49 ContextClient::trace(visitor);
51 } 50 }
52 51
53 const char* NavigatorWebMIDI::supplementName() { 52 const char* NavigatorWebMIDI::supplementName() {
54 return "NavigatorWebMIDI"; 53 return "NavigatorWebMIDI";
55 } 54 }
56 55
57 NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) { 56 NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) {
58 NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>( 57 NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>(
59 Supplement<Navigator>::from(navigator, supplementName())); 58 Supplement<Navigator>::from(navigator, supplementName()));
60 if (!supplement) { 59 if (!supplement) {
(...skipping 17 matching lines...) Expand all
78 scriptState, 77 scriptState,
79 DOMException::create(AbortError, "The frame is not working.")); 78 DOMException::create(AbortError, "The frame is not working."));
80 } 79 }
81 80
82 UseCounter::countCrossOriginIframe(*frame()->document(), 81 UseCounter::countCrossOriginIframe(*frame()->document(),
83 UseCounter::RequestMIDIAccessIframe); 82 UseCounter::RequestMIDIAccessIframe);
84 return MIDIAccessInitializer::start(scriptState, options); 83 return MIDIAccessInitializer::start(scriptState, options);
85 } 84 }
86 85
87 } // namespace blink 86 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698