Merge mozilla-central to autoland. CLOSED TREE
[gecko.git] / widget / PuppetBidiKeyboard.cpp
blob99ea6f6ca97c17db267ca25f5507c9a99af23d00
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=8 et :
3 */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "PuppetBidiKeyboard.h"
9 #include "nsIWidget.h"
11 using namespace mozilla::widget;
13 NS_IMPL_ISUPPORTS(PuppetBidiKeyboard, nsIBidiKeyboard)
15 PuppetBidiKeyboard::PuppetBidiKeyboard()
16 : nsIBidiKeyboard(), mIsLangRTL(false), mHaveBidiKeyboards(false) {}
18 PuppetBidiKeyboard::~PuppetBidiKeyboard() = default;
20 NS_IMETHODIMP
21 PuppetBidiKeyboard::Reset() { return NS_OK; }
23 NS_IMETHODIMP
24 PuppetBidiKeyboard::IsLangRTL(bool* aIsRTL) {
25 *aIsRTL = mIsLangRTL;
26 return NS_OK;
29 void PuppetBidiKeyboard::SetBidiKeyboardInfo(bool aIsLangRTL,
30 bool aHaveBidiKeyboards) {
31 mIsLangRTL = aIsLangRTL;
32 mHaveBidiKeyboards = aHaveBidiKeyboards;
35 NS_IMETHODIMP
36 PuppetBidiKeyboard::GetHaveBidiKeyboards(bool* aResult) {
37 *aResult = mHaveBidiKeyboards;
38 return NS_OK;
41 // static
42 already_AddRefed<nsIBidiKeyboard>
43 nsIWidget::CreateBidiKeyboardContentProcess() {
44 return do_AddRef(new PuppetBidiKeyboard());