/src/mozilla-central/widget/headless/HeadlessKeyBindings.cpp
Line | Count | Source (jump to first uncovered line) |
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/. */ |
5 | | |
6 | | #include "HeadlessKeyBindings.h" |
7 | | #include "mozilla/ClearOnShutdown.h" |
8 | | |
9 | | namespace mozilla { |
10 | | namespace widget { |
11 | | |
12 | | HeadlessKeyBindings& |
13 | | HeadlessKeyBindings::GetInstance() |
14 | 0 | { |
15 | 0 | static UniquePtr<HeadlessKeyBindings> sInstance; |
16 | 0 | if (!sInstance) { |
17 | 0 | sInstance.reset(new HeadlessKeyBindings()); |
18 | 0 | ClearOnShutdown(&sInstance); |
19 | 0 | } |
20 | 0 | return *sInstance; |
21 | 0 | } |
22 | | |
23 | | nsresult |
24 | | HeadlessKeyBindings::AttachNativeKeyEvent(WidgetKeyboardEvent& aEvent) |
25 | 0 | { |
26 | 0 | // Stub for non-mac platforms. |
27 | 0 | return NS_OK; |
28 | 0 | } |
29 | | |
30 | | void |
31 | | HeadlessKeyBindings::GetEditCommands(nsIWidget::NativeKeyBindingsType aType, |
32 | | const WidgetKeyboardEvent& aEvent, |
33 | | nsTArray<CommandInt>& aCommands) |
34 | 0 | { |
35 | 0 | // Stub for non-mac platforms. |
36 | 0 | } |
37 | | |
38 | | } // namespace widget |
39 | | } // namespace mozilla |