1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "MediaKeysEventSourceFactory.h"
7 #include "MediaHardwareKeysEventSourceMac.h"
8 #include "MediaHardwareKeysEventSourceMacMediaCenter.h"
9 #include "nsCocoaFeatures.h"
14 mozilla::dom::MediaControlKeySource
* CreateMediaControlKeySource() {
15 if (nsCocoaFeatures::IsAtLeastVersion(10, 12, 2)) {
16 return new MediaHardwareKeysEventSourceMacMediaCenter();
18 return new MediaHardwareKeysEventSourceMac();
23 } // namespace mozilla