gecko-dev/widget/android/nsLookAndFeel.h
Brad Werth 78c75cba79 Bug 1403690 Part 5: Android change pref and color caching to match approach used in gtk, macOS, and Windows. r=snorp
MozReview-Commit-ID: DoffjB9QMmH

--HG--
extra : rebase_source : affb42e8d97da20d6625463af1ca44ca2cd4b45e
2017-10-10 13:12:28 -07:00

42 lines
1.3 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __nsLookAndFeel
#define __nsLookAndFeel
#include "nsXPLookAndFeel.h"
#include "AndroidBridge.h"
class nsLookAndFeel final : public nsXPLookAndFeel
{
public:
nsLookAndFeel();
virtual ~nsLookAndFeel();
virtual void NativeInit() final;
virtual void RefreshImpl();
virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
virtual bool GetFontImpl(FontID aID, nsString& aName, gfxFontStyle& aStyle,
float aDevPixPerCSSPixel);
virtual bool GetEchoPasswordImpl();
virtual uint32_t GetPasswordMaskDelayImpl();
virtual char16_t GetPasswordCharacterImpl();
protected:
static bool mInitializedSystemColors;
static mozilla::AndroidSystemColors mSystemColors;
static bool mInitializedShowPassword;
static bool mShowPassword;
nsresult GetSystemColors();
nsresult CallRemoteGetSystemColors();
void EnsureInitSystemColors();
void EnsureInitShowPassword();
};
#endif