Merge mozilla-central to autoland on a CLOSED TREE
[gecko.git] / widget / headless / HeadlessKeyBindings.cpp
blob13fcd4c6ca2caa18b18820fda558937b0d6950fd
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "HeadlessKeyBindings.h"
7 #include "mozilla/ClearOnShutdown.h"
8 #include "mozilla/Maybe.h"
9 #include "mozilla/NativeKeyBindingsType.h"
10 #include "mozilla/WritingModes.h"
12 namespace mozilla {
13 namespace widget {
15 HeadlessKeyBindings& HeadlessKeyBindings::GetInstance() {
16 static UniquePtr<HeadlessKeyBindings> sInstance;
17 if (!sInstance) {
18 sInstance.reset(new HeadlessKeyBindings());
19 ClearOnShutdown(&sInstance);
21 return *sInstance;
24 nsresult HeadlessKeyBindings::AttachNativeKeyEvent(
25 WidgetKeyboardEvent& aEvent) {
26 // Stub for non-mac platforms.
27 return NS_OK;
30 void HeadlessKeyBindings::GetEditCommands(
31 NativeKeyBindingsType aType, const WidgetKeyboardEvent& aEvent,
32 const Maybe<WritingMode>& aWritingMode, nsTArray<CommandInt>& aCommands) {
33 // Stub for non-mac platforms.
36 } // namespace widget
37 } // namespace mozilla