mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Backed out changeset 684888aeee81 (bug 1287946)
This commit is contained in:
parent
d8c7234cc9
commit
e8bc59a87a
@ -4,19 +4,19 @@
|
||||
* 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/. */
|
||||
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
void StartGamepadMonitoring()
|
||||
{
|
||||
java::GeckoAppShell::StartMonitoringGamepad();
|
||||
widget::GeckoAppShell::StartMonitoringGamepad();
|
||||
}
|
||||
|
||||
void StopGamepadMonitoring()
|
||||
{
|
||||
java::GeckoAppShell::StopMonitoringGamepad();
|
||||
widget::GeckoAppShell::StopMonitoringGamepad();
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
|
@ -2837,7 +2837,7 @@ ContentParent::RecvGetShowPasswordSetting(bool* showPassword)
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
NS_ASSERTION(AndroidBridge::Bridge() != nullptr, "AndroidBridge is not available");
|
||||
|
||||
*showPassword = java::GeckoAppShell::GetShowPasswordSetting();
|
||||
*showPassword = mozilla::widget::GeckoAppShell::GetShowPasswordSetting();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
#include "mozilla/layers/LayersTypes.h"
|
||||
|
||||
|
@ -32,6 +32,10 @@
|
||||
#include "gfxPlatform.h"
|
||||
#include "mozilla/Snprintf.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
|
||||
|
@ -35,7 +35,7 @@ static PRLogModuleInfo* AndroidDecoderModuleLog()
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gl;
|
||||
using namespace mozilla::java::sdk;
|
||||
using namespace mozilla::widget::sdk;
|
||||
using media::TimeUnit;
|
||||
|
||||
namespace mozilla {
|
||||
@ -179,9 +179,9 @@ public:
|
||||
&buffer));
|
||||
|
||||
if (!buffer && aConfig.mCodecSpecificConfig->Length() >= 2) {
|
||||
buffer = jni::ByteBuffer::New(
|
||||
aConfig.mCodecSpecificConfig->Elements(),
|
||||
aConfig.mCodecSpecificConfig->Length());
|
||||
buffer = jni::Object::LocalRef::Adopt(
|
||||
env, env->NewDirectByteBuffer(aConfig.mCodecSpecificConfig->Elements(),
|
||||
aConfig.mCodecSpecificConfig->Length()));
|
||||
NS_ENSURE_SUCCESS_VOID(aFormat->SetByteBuffer(NS_LITERAL_STRING("csd-0"),
|
||||
buffer));
|
||||
}
|
||||
@ -277,7 +277,7 @@ AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType,
|
||||
return false;
|
||||
}
|
||||
|
||||
return java::HardwareCodecCapabilityUtils::FindDecoderCodecInfoForMimeType(
|
||||
return widget::HardwareCodecCapabilityUtils::FindDecoderCodecInfoForMimeType(
|
||||
nsCString(TranslateMimeType(aMimeType)));
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
MediaCodecDataDecoder(MediaData::Type aType,
|
||||
const nsACString& aMimeType,
|
||||
java::sdk::MediaFormat::Param aFormat,
|
||||
widget::sdk::MediaFormat::Param aFormat,
|
||||
MediaDataDecoderCallback* aCallback);
|
||||
|
||||
virtual ~MediaCodecDataDecoder();
|
||||
@ -73,16 +73,16 @@ protected:
|
||||
|
||||
static const char* ModuleStateStr(ModuleState aState);
|
||||
|
||||
virtual nsresult InitDecoder(java::sdk::Surface::Param aSurface);
|
||||
virtual nsresult InitDecoder(widget::sdk::Surface::Param aSurface);
|
||||
|
||||
virtual nsresult Output(java::sdk::BufferInfo::Param aInfo, void* aBuffer,
|
||||
java::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration)
|
||||
virtual nsresult Output(widget::sdk::BufferInfo::Param aInfo, void* aBuffer,
|
||||
widget::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult PostOutput(java::sdk::BufferInfo::Param aInfo,
|
||||
java::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration)
|
||||
virtual nsresult PostOutput(widget::sdk::BufferInfo::Param aInfo,
|
||||
widget::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
@ -99,8 +99,8 @@ protected:
|
||||
nsresult QueueEOS();
|
||||
void HandleEOS(int32_t aOutputStatus);
|
||||
Maybe<media::TimeUnit> GetOutputDuration();
|
||||
nsresult ProcessOutput(java::sdk::BufferInfo::Param aInfo,
|
||||
java::sdk::MediaFormat::Param aFormat,
|
||||
nsresult ProcessOutput(widget::sdk::BufferInfo::Param aInfo,
|
||||
widget::sdk::MediaFormat::Param aFormat,
|
||||
int32_t aStatus);
|
||||
ModuleState State() const;
|
||||
// Sets decoder state and returns whether the new state has become effective.
|
||||
@ -112,11 +112,11 @@ protected:
|
||||
MediaData::Type mType;
|
||||
|
||||
nsAutoCString mMimeType;
|
||||
java::sdk::MediaFormat::GlobalRef mFormat;
|
||||
widget::sdk::MediaFormat::GlobalRef mFormat;
|
||||
|
||||
MediaDataDecoderCallback* mCallback;
|
||||
|
||||
java::sdk::MediaCodec::GlobalRef mDecoder;
|
||||
widget::sdk::MediaCodec::GlobalRef mDecoder;
|
||||
|
||||
jni::ObjectArray::GlobalRef mInputBuffers;
|
||||
jni::ObjectArray::GlobalRef mOutputBuffers;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "nsIPrefBranch.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsISupportsUtils.h"
|
||||
#endif
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class SmsManager : public java::GeckoSmsManager::Natives<SmsManager>
|
||||
class SmsManager : public widget::GeckoSmsManager::Natives<SmsManager>
|
||||
{
|
||||
private:
|
||||
SmsManager();
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <android/log.h>
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsNPAPIPlugin.h"
|
||||
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args)
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
// must include config.h first for webkit to fiddle with new/delete
|
||||
#include <android/log.h>
|
||||
#include "AndroidBridge.h"
|
||||
#include "ANPBase.h"
|
||||
#include "nsIPluginInstanceOwner.h"
|
||||
#include "nsPluginInstanceOwner.h"
|
||||
|
@ -5,14 +5,13 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#include "ANPBase.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "PluginPRLibrary.h"
|
||||
#include "assert.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsNPAPIPlugin.h"
|
||||
|
||||
#include "ANPBase.h"
|
||||
#include <android/log.h>
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsNPAPIPlugin.h"
|
||||
#include "PluginPRLibrary.h"
|
||||
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args)
|
||||
#define ASSIGN(obj, name) (obj)->name = anp_system_##name
|
||||
@ -61,7 +60,7 @@ jclass anp_system_loadJavaClass(NPP instance, const char* className)
|
||||
nsCString libName;
|
||||
lib->GetLibraryPath(libName);
|
||||
|
||||
return mozilla::java::GeckoAppShell::LoadPluginClass(className, libName).Forget();
|
||||
return mozilla::widget::GeckoAppShell::LoadPluginClass(className, libName).Forget();
|
||||
}
|
||||
|
||||
void anp_system_setPowerState(NPP instance, ANPPowerState powerState)
|
||||
|
@ -3,6 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <android/log.h>
|
||||
#include "AndroidBridge.h"
|
||||
#include "ANPBase.h"
|
||||
#include "nsIPluginInstanceOwner.h"
|
||||
#include "nsPluginInstanceOwner.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "assert.h"
|
||||
#include "ANPBase.h"
|
||||
#include <android/log.h>
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsPluginInstanceOwner.h"
|
||||
#include "nsWindow.h"
|
||||
|
@ -101,7 +101,7 @@ using mozilla::plugins::PluginModuleContentParent;
|
||||
#include <android/log.h>
|
||||
#include "android_npapi.h"
|
||||
#include "ANPBase.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#undef LOG
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args)
|
||||
#endif
|
||||
@ -2115,7 +2115,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
|
||||
case kJavaContext_ANPGetValue: {
|
||||
LOG("get java context");
|
||||
auto ret = java::GeckoAppShell::GetContext();
|
||||
auto ret = widget::GeckoAppShell::GetContext();
|
||||
if (!ret)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
|
@ -788,7 +788,7 @@ void nsNPAPIPluginInstance::NotifyFullScreen(bool aFullScreen)
|
||||
SendLifecycleEvent(this, mFullScreen ? kEnterFullScreen_ANPLifecycleAction : kExitFullScreen_ANPLifecycleAction);
|
||||
|
||||
if (mFullScreen && mFullScreenOrientation != dom::eScreenOrientation_None) {
|
||||
java::GeckoAppShell::LockScreenOrientation(mFullScreenOrientation);
|
||||
widget::GeckoAppShell::LockScreenOrientation(mFullScreenOrientation);
|
||||
}
|
||||
}
|
||||
|
||||
@ -845,11 +845,11 @@ void nsNPAPIPluginInstance::SetFullScreenOrientation(uint32_t orientation)
|
||||
// We're already fullscreen so immediately apply the orientation change
|
||||
|
||||
if (mFullScreenOrientation != dom::eScreenOrientation_None) {
|
||||
java::GeckoAppShell::LockScreenOrientation(mFullScreenOrientation);
|
||||
widget::GeckoAppShell::LockScreenOrientation(mFullScreenOrientation);
|
||||
} else if (oldOrientation != dom::eScreenOrientation_None) {
|
||||
// We applied an orientation when we entered fullscreen, but
|
||||
// we don't want it anymore
|
||||
java::GeckoAppShell::UnlockScreenOrientation();
|
||||
widget::GeckoAppShell::UnlockScreenOrientation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1559,7 +1559,7 @@ void nsPluginInstanceOwner::RemovePluginView()
|
||||
if (!mInstance || !mJavaView)
|
||||
return;
|
||||
|
||||
java::GeckoAppShell::RemovePluginView(
|
||||
widget::GeckoAppShell::RemovePluginView(
|
||||
jni::Object::Ref::From(jobject(mJavaView)), mFullScreen);
|
||||
jni::GetGeckoThreadEnv()->DeleteGlobalRef((jobject)mJavaView);
|
||||
mJavaView = nullptr;
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include "nsGeolocation.h"
|
||||
#include "nsGeoPosition.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "AndroidLocationProvider.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -27,7 +27,7 @@ AndroidLocationProvider::~AndroidLocationProvider()
|
||||
NS_IMETHODIMP
|
||||
AndroidLocationProvider::Startup()
|
||||
{
|
||||
java::GeckoAppShell::EnableLocation(true);
|
||||
widget::GeckoAppShell::EnableLocation(true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -43,13 +43,13 @@ AndroidLocationProvider::Watch(nsIGeolocationUpdate* aCallback)
|
||||
NS_IMETHODIMP
|
||||
AndroidLocationProvider::Shutdown()
|
||||
{
|
||||
java::GeckoAppShell::EnableLocation(false);
|
||||
widget::GeckoAppShell::EnableLocation(false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AndroidLocationProvider::SetHighAccuracy(bool enable)
|
||||
{
|
||||
java::GeckoAppShell::EnableLocationHighAccuracy(enable);
|
||||
widget::GeckoAppShell::EnableLocationHighAccuracy(enable);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "nsHapticFeedback.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -15,6 +15,6 @@ NS_IMPL_ISUPPORTS(nsHapticFeedback, nsIHapticFeedback)
|
||||
NS_IMETHODIMP
|
||||
nsHapticFeedback::PerformSimpleAction(int32_t aType)
|
||||
{
|
||||
java::GeckoAppShell::PerformHapticFeedback(aType == LongPress);
|
||||
widget::GeckoAppShell::PerformHapticFeedback(aType == LongPress);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::jni;
|
||||
using namespace mozilla::java;
|
||||
using namespace mozilla::java::sdk;
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla::widget::sdk;
|
||||
|
||||
namespace mozilla {
|
||||
namespace gl {
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
void NotifyFrameAvailable();
|
||||
|
||||
GLuint Texture() const { return mTexture; }
|
||||
const java::sdk::Surface::Ref& JavaSurface() const { return mSurface; }
|
||||
const widget::sdk::Surface::Ref& JavaSurface() const { return mSurface; }
|
||||
|
||||
private:
|
||||
AndroidSurfaceTexture();
|
||||
@ -92,8 +92,8 @@ private:
|
||||
bool Init(GLContext* aContext, GLuint aTexture);
|
||||
|
||||
GLuint mTexture;
|
||||
java::sdk::SurfaceTexture::GlobalRef mSurfaceTexture;
|
||||
java::sdk::Surface::GlobalRef mSurface;
|
||||
widget::sdk::SurfaceTexture::GlobalRef mSurfaceTexture;
|
||||
widget::sdk::Surface::GlobalRef mSurface;
|
||||
|
||||
GLContext* mAttachedContext;
|
||||
|
||||
|
@ -21,10 +21,8 @@ namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
AndroidSpecificState::AndroidSpecificState() {
|
||||
using namespace mozilla::java;
|
||||
|
||||
sdk::ViewConfiguration::LocalRef config;
|
||||
if (sdk::ViewConfiguration::Get(GeckoAppShell::GetApplicationContext(), &config) == NS_OK) {
|
||||
widget::sdk::ViewConfiguration::LocalRef config;
|
||||
if (widget::sdk::ViewConfiguration::Get(widget::GeckoAppShell::GetApplicationContext(), &config) == NS_OK) {
|
||||
int32_t speed = 0;
|
||||
if (config->GetScaledMaximumFlingVelocity(&speed) == NS_OK) {
|
||||
sMaxFlingSpeed = (float)speed * 0.001f;
|
||||
@ -34,9 +32,8 @@ AndroidSpecificState::AndroidSpecificState() {
|
||||
} else {
|
||||
ANDROID_APZ_LOG("%p Failed to get ViewConfiguration\n", this);
|
||||
}
|
||||
|
||||
StackScroller::LocalRef scroller;
|
||||
if (StackScroller::New(GeckoAppShell::GetApplicationContext(), &scroller) != NS_OK) {
|
||||
widget::StackScroller::LocalRef scroller;
|
||||
if (widget::StackScroller::New(widget::GeckoAppShell::GetApplicationContext(), &scroller) != NS_OK) {
|
||||
ANDROID_APZ_LOG("%p Failed to create Android StackScroller\n", this);
|
||||
return;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
return this;
|
||||
}
|
||||
|
||||
java::StackScroller::GlobalRef mOverScroller;
|
||||
widget::StackScroller::GlobalRef mOverScroller;
|
||||
};
|
||||
|
||||
class AndroidFlingAnimation: public AsyncPanZoomAnimation {
|
||||
@ -40,7 +40,7 @@ private:
|
||||
bool CheckBounds(Axis& aAxis, float aValue, float aDirection, float* aClamped);
|
||||
|
||||
AsyncPanZoomController& mApzc;
|
||||
java::StackScroller::GlobalRef mOverScroller;
|
||||
widget::StackScroller::GlobalRef mOverScroller;
|
||||
RefPtr<const OverscrollHandoffChain> mOverscrollHandoffChain;
|
||||
RefPtr<const AsyncPanZoomController> mScrolledApzc;
|
||||
bool mSentBounceX;
|
||||
|
@ -89,6 +89,10 @@
|
||||
#include "nsScreenManagerGonk.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#include "LayerScope.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include "cairo.h"
|
||||
#include "VsyncSource.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include <cutils/properties.h>
|
||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||
|
@ -4,15 +4,15 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Hal.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
#include "GeneratedJNINatives.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
|
||||
using namespace mozilla::hal;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class AlarmReceiver : public java::AlarmReceiver::Natives<AlarmReceiver>
|
||||
class AlarmReceiver : public widget::AlarmReceiver::Natives<AlarmReceiver>
|
||||
{
|
||||
private:
|
||||
AlarmReceiver();
|
||||
@ -38,13 +38,13 @@ EnableAlarm()
|
||||
void
|
||||
DisableAlarm()
|
||||
{
|
||||
java::GeckoAppShell::DisableAlarm();
|
||||
widget::GeckoAppShell::DisableAlarm();
|
||||
}
|
||||
|
||||
bool
|
||||
SetAlarm(int32_t aSeconds, int32_t aNanoseconds)
|
||||
{
|
||||
return java::GeckoAppShell::SetAlarm(aSeconds, aNanoseconds);
|
||||
return widget::GeckoAppShell::SetAlarm(aSeconds, aNanoseconds);
|
||||
}
|
||||
|
||||
} // hal_impl
|
||||
|
@ -15,8 +15,6 @@
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::hal;
|
||||
|
||||
namespace java = mozilla::java;
|
||||
|
||||
namespace mozilla {
|
||||
namespace hal_impl {
|
||||
|
||||
@ -56,19 +54,19 @@ CancelVibrate(const WindowIdentifier &)
|
||||
{
|
||||
// Ignore WindowIdentifier parameter.
|
||||
|
||||
java::GeckoAppShell::CancelVibrate();
|
||||
mozilla::widget::GeckoAppShell::CancelVibrate();
|
||||
}
|
||||
|
||||
void
|
||||
EnableBatteryNotifications()
|
||||
{
|
||||
java::GeckoAppShell::EnableBatteryNotifications();
|
||||
mozilla::widget::GeckoAppShell::EnableBatteryNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
DisableBatteryNotifications()
|
||||
{
|
||||
java::GeckoAppShell::DisableBatteryNotifications();
|
||||
mozilla::widget::GeckoAppShell::DisableBatteryNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
@ -80,13 +78,13 @@ GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo)
|
||||
void
|
||||
EnableNetworkNotifications()
|
||||
{
|
||||
java::GeckoAppShell::EnableNetworkNotifications();
|
||||
mozilla::widget::GeckoAppShell::EnableNetworkNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
DisableNetworkNotifications()
|
||||
{
|
||||
java::GeckoAppShell::DisableNetworkNotifications();
|
||||
mozilla::widget::GeckoAppShell::DisableNetworkNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
@ -98,13 +96,13 @@ GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo)
|
||||
void
|
||||
EnableScreenConfigurationNotifications()
|
||||
{
|
||||
java::GeckoAppShell::EnableScreenOrientationNotifications();
|
||||
mozilla::widget::GeckoAppShell::EnableScreenOrientationNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
DisableScreenConfigurationNotifications()
|
||||
{
|
||||
java::GeckoAppShell::DisableScreenOrientationNotifications();
|
||||
mozilla::widget::GeckoAppShell::DisableScreenOrientationNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
@ -157,7 +155,7 @@ LockScreenOrientation(const ScreenOrientationInternal& aOrientation)
|
||||
case eScreenOrientation_LandscapeSecondary:
|
||||
case eScreenOrientation_LandscapePrimary | eScreenOrientation_LandscapeSecondary:
|
||||
case eScreenOrientation_Default:
|
||||
java::GeckoAppShell::LockScreenOrientation(orientation);
|
||||
mozilla::widget::GeckoAppShell::LockScreenOrientation(orientation);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@ -167,7 +165,7 @@ LockScreenOrientation(const ScreenOrientationInternal& aOrientation)
|
||||
void
|
||||
UnlockScreenOrientation()
|
||||
{
|
||||
java::GeckoAppShell::UnlockScreenOrientation();
|
||||
mozilla::widget::GeckoAppShell::UnlockScreenOrientation();
|
||||
}
|
||||
|
||||
} // hal_impl
|
||||
|
@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Hal.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
using namespace mozilla::hal;
|
||||
|
||||
@ -13,12 +13,12 @@ namespace hal_impl {
|
||||
|
||||
void
|
||||
EnableSensorNotifications(SensorType aSensor) {
|
||||
java::GeckoAppShell::EnableSensor(aSensor);
|
||||
widget::GeckoAppShell::EnableSensor(aSensor);
|
||||
}
|
||||
|
||||
void
|
||||
DisableSensorNotifications(SensorType aSensor) {
|
||||
java::GeckoAppShell::DisableSensor(aSensor);
|
||||
widget::GeckoAppShell::DisableSensor(aSensor);
|
||||
}
|
||||
|
||||
} // hal_impl
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <webrtc/common_video/libyuv/include/webrtc_libyuv.h>
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::java::sdk;
|
||||
using namespace mozilla::widget::sdk;
|
||||
|
||||
static const int32_t DECODER_TIMEOUT = 10 * PR_USEC_PER_MSEC; // 10ms
|
||||
static const char MEDIACODEC_VIDEO_MIME_VP8[] = "video/x-vnd.on2.vp8";
|
||||
|
@ -5,10 +5,10 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsAndroidHistory.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "Link.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "Link.h"
|
||||
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
@ -77,7 +77,7 @@ nsAndroidHistory::RegisterVisitedCallback(nsIURI *aURI, Link *aContent)
|
||||
list->AppendElement(aContent);
|
||||
|
||||
if (jni::IsAvailable()) {
|
||||
java::GeckoAppShell::CheckURIVisited(uriString);
|
||||
widget::GeckoAppShell::CheckURIVisited(uriString);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -203,7 +203,7 @@ nsAndroidHistory::SaveVisitURI(nsIURI* aURI) {
|
||||
// Save this URI in our history
|
||||
nsAutoCString spec;
|
||||
(void)aURI->GetSpec(spec);
|
||||
java::GeckoAppShell::MarkURIVisited(NS_ConvertUTF8toUTF16(spec));
|
||||
widget::GeckoAppShell::MarkURIVisited(NS_ConvertUTF8toUTF16(spec));
|
||||
}
|
||||
|
||||
// Finally, notify that we've been visited.
|
||||
@ -292,7 +292,7 @@ nsAndroidHistory::SetURITitle(nsIURI *aURI, const nsAString& aTitle)
|
||||
SaveVisitURI(aURI);
|
||||
}
|
||||
NS_ConvertUTF8toUTF16 uriString(uri);
|
||||
java::GeckoAppShell::SetURITitle(uriString, aTitle);
|
||||
widget::GeckoAppShell::SetURITitle(uriString, aTitle);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "nsShellService.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -25,6 +25,6 @@ nsShellService::CreateShortcut(const nsAString& aTitle, const nsAString& aURI,
|
||||
if (!aTitle.Length() || !aURI.Length())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
java::GeckoAppShell::CreateShortcut(aTitle, aURI);
|
||||
widget::GeckoAppShell::CreateShortcut(aTitle, aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ Tickler::Init()
|
||||
MOZ_ASSERT(!mFD);
|
||||
|
||||
if (jni::IsAvailable()) {
|
||||
java::GeckoAppShell::EnableNetworkNotifications();
|
||||
widget::GeckoAppShell::EnableNetworkNotifications();
|
||||
}
|
||||
|
||||
mFD = PR_OpenUDPSocket(PR_AF_INET);
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "base/basictypes.h"
|
||||
#include "AndroidCaptureProvider.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsStreamUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsMemory.h"
|
||||
|
@ -90,7 +90,7 @@ bool CameraStreamImpl::Init(const nsCString& contentType, const uint32_t& camera
|
||||
}
|
||||
|
||||
void CameraStreamImpl::Close() {
|
||||
java::GeckoAppShell::CloseCamera();
|
||||
mozilla::widget::GeckoAppShell::CloseCamera();
|
||||
mCallback = nullptr;
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
namespace java = mozilla::java;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsAndroidNetworkLinkService,
|
||||
nsINetworkLinkService)
|
||||
|
||||
@ -33,7 +31,7 @@ nsAndroidNetworkLinkService::GetIsLinkUp(bool *aIsUp)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aIsUp = java::GeckoAppShell::IsNetworkLinkUp();
|
||||
*aIsUp = mozilla::widget::GeckoAppShell::IsNetworkLinkUp();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -42,7 +40,7 @@ nsAndroidNetworkLinkService::GetLinkStatusKnown(bool *aIsKnown)
|
||||
{
|
||||
NS_ENSURE_TRUE(mozilla::AndroidBridge::Bridge(), NS_ERROR_NOT_IMPLEMENTED);
|
||||
|
||||
*aIsKnown = java::GeckoAppShell::IsNetworkLinkKnown();
|
||||
*aIsKnown = mozilla::widget::GeckoAppShell::IsNetworkLinkKnown();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -58,6 +56,6 @@ nsAndroidNetworkLinkService::GetLinkType(uint32_t *aLinkType)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aLinkType = java::GeckoAppShell::NetworkLinkType();
|
||||
*aLinkType = mozilla::widget::GeckoAppShell::NetworkLinkType();
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ NS_IMETHODIMP nsAlertsService::CloseAlert(const nsAString& aAlertName,
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
java::GeckoAppShell::CloseNotification(aAlertName);
|
||||
widget::GeckoAppShell::CloseNotification(aAlertName);
|
||||
return NS_OK;
|
||||
#else
|
||||
|
||||
@ -354,8 +354,9 @@ NS_IMETHODIMP nsAlertsService::OnProgress(const nsAString & aAlertName,
|
||||
const nsAString & aAlertText)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
java::GeckoAppShell::AlertsProgressListener_OnProgress(
|
||||
aAlertName, aProgress, aProgressMax, aAlertText);
|
||||
widget::GeckoAppShell::AlertsProgressListener_OnProgress(aAlertName,
|
||||
aProgress, aProgressMax,
|
||||
aAlertText);
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
@ -365,7 +366,7 @@ NS_IMETHODIMP nsAlertsService::OnProgress(const nsAString & aAlertName,
|
||||
NS_IMETHODIMP nsAlertsService::OnCancel(const nsAString & aAlertName)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
java::GeckoAppShell::CloseNotification(aAlertName);
|
||||
widget::GeckoAppShell::CloseNotification(aAlertName);
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -61,7 +61,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
@ -2791,7 +2791,7 @@ nsDownload::SetState(DownloadState aState)
|
||||
if (mimeInfo)
|
||||
mimeInfo->GetMIMEType(contentType);
|
||||
|
||||
java::DownloadsIntegration::ScanMedia(path, NS_ConvertUTF8toUTF16(contentType));
|
||||
mozilla::widget::DownloadsIntegration::ScanMedia(path, NS_ConvertUTF8toUTF16(contentType));
|
||||
}
|
||||
#else
|
||||
if (addToRecentDocs && !mPrivate) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
@ -84,7 +84,7 @@ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIFile* aTarget,
|
||||
bool addToRecentDocs = Preferences::GetBool(PREF_BDM_ADDTORECENTDOCS);
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (addToRecentDocs) {
|
||||
java::DownloadsIntegration::ScanMedia(path, NS_ConvertUTF8toUTF16(aContentType));
|
||||
mozilla::widget::DownloadsIntegration::ScanMedia(path, NS_ConvertUTF8toUTF16(aContentType));
|
||||
}
|
||||
#else
|
||||
if (addToRecentDocs && !aIsPrivate) {
|
||||
|
@ -4,11 +4,9 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsParentalControlsService.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIFile.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
|
||||
namespace java = mozilla::java;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsParentalControlsService, nsIParentalControlsService)
|
||||
|
||||
@ -16,7 +14,7 @@ nsParentalControlsService::nsParentalControlsService() :
|
||||
mEnabled(false)
|
||||
{
|
||||
if (mozilla::jni::IsAvailable()) {
|
||||
mEnabled = java::Restrictions::IsUserRestricted();
|
||||
mEnabled = mozilla::widget::Restrictions::IsUserRestricted();
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,7 +92,7 @@ nsParentalControlsService::IsAllowed(int16_t aAction,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
*_retval = java::Restrictions::IsAllowed(aAction,
|
||||
*_retval = mozilla::widget::Restrictions::IsAllowed(aAction,
|
||||
NS_ConvertUTF8toUTF16(url));
|
||||
return rv;
|
||||
}
|
||||
|
@ -199,7 +199,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_SANDBOX)
|
||||
@ -1720,7 +1720,7 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
|
||||
SaveToEnv("MOZ_LAUNCHED_CHILD=1");
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
java::GeckoAppShell::ScheduleRestart();
|
||||
mozilla::widget::GeckoAppShell::ScheduleRestart();
|
||||
#else
|
||||
#if defined(XP_MACOSX)
|
||||
CommandLineServiceMac::SetupMacCommandLine(gRestartArgc, gRestartArgv, true);
|
||||
@ -1858,7 +1858,7 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
|
||||
if (aUnlocker) {
|
||||
int32_t button;
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
java::GeckoAppShell::KillAnyZombies();
|
||||
mozilla::widget::GeckoAppShell::KillAnyZombies();
|
||||
button = 0;
|
||||
#else
|
||||
const uint32_t flags =
|
||||
@ -1887,7 +1887,7 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
|
||||
}
|
||||
} else {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (java::GeckoAppShell::UnlockProfile()) {
|
||||
if (mozilla::widget::GeckoAppShell::UnlockProfile()) {
|
||||
return NS_LockProfilePath(aProfileDir, aProfileLocalDir,
|
||||
nullptr, aResult);
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ void BuildJavaThreadJSObject(SpliceableJSONWriter& aWriter)
|
||||
firstRun = false;
|
||||
|
||||
double sampleTime =
|
||||
java::GeckoJavaSampler::GetSampleTimeJavaProfiling(0, sampleId);
|
||||
mozilla::widget::GeckoJavaSampler::GetSampleTimeJavaProfiling(0, sampleId);
|
||||
|
||||
aWriter.StartObjectElement();
|
||||
aWriter.DoubleProperty("time", sampleTime);
|
||||
@ -562,7 +562,7 @@ void GeckoSampler::StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime)
|
||||
|
||||
#if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
if (ProfileJava()) {
|
||||
java::GeckoJavaSampler::PauseJavaProfiling();
|
||||
mozilla::widget::GeckoJavaSampler::PauseJavaProfiling();
|
||||
|
||||
aWriter.Start();
|
||||
{
|
||||
@ -570,7 +570,7 @@ void GeckoSampler::StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime)
|
||||
}
|
||||
aWriter.End();
|
||||
|
||||
java::GeckoJavaSampler::UnpauseJavaProfiling();
|
||||
mozilla::widget::GeckoJavaSampler::UnpauseJavaProfiling();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
@ -52,7 +52,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
class GeckoJavaSampler : public java::GeckoJavaSampler::Natives<GeckoJavaSampler>
|
||||
class GeckoJavaSampler : public widget::GeckoJavaSampler::Natives<GeckoJavaSampler>
|
||||
{
|
||||
private:
|
||||
GeckoJavaSampler();
|
||||
@ -825,7 +825,7 @@ void mozilla_sampler_start(int aProfileEntries, double aInterval,
|
||||
if (javaInterval < 10) {
|
||||
aInterval = 10;
|
||||
}
|
||||
java::GeckoJavaSampler::StartJavaProfiling(javaInterval, 1000);
|
||||
mozilla::widget::GeckoJavaSampler::StartJavaProfiling(javaInterval, 1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsAndroidHandlerApp.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -76,7 +76,7 @@ nsAndroidHandlerApp::LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowC
|
||||
{
|
||||
nsCString uriSpec;
|
||||
aURI->GetSpec(uriSpec);
|
||||
return java::GeckoAppShell::OpenUriExternal(
|
||||
return widget::GeckoAppShell::OpenUriExternal(
|
||||
uriSpec, mMimeType, mPackageName, mClassName,
|
||||
mAction, EmptyString()) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -84,7 +84,7 @@ nsAndroidHandlerApp::LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowC
|
||||
NS_IMETHODIMP
|
||||
nsAndroidHandlerApp::Share(const nsAString & data, const nsAString & title)
|
||||
{
|
||||
return java::GeckoAppShell::OpenUriExternal(
|
||||
return widget::GeckoAppShell::OpenUriExternal(
|
||||
data, mMimeType, mPackageName, mClassName,
|
||||
mAction, EmptyString()) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ nsExternalSharingAppService::ShareWithDefault(const nsAString & data,
|
||||
{
|
||||
NS_NAMED_LITERAL_STRING(sendAction, "android.intent.action.SEND");
|
||||
const nsString emptyString = EmptyString();
|
||||
return java::GeckoAppShell::OpenUriExternal(data,
|
||||
return widget::GeckoAppShell::OpenUriExternal(data,
|
||||
mime, emptyString, emptyString, sendAction, title) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ nsMIMEInfoAndroid::LoadUriInternal(nsIURI * aURI)
|
||||
mimeType = NS_ConvertUTF8toUTF16(mType);
|
||||
}
|
||||
|
||||
if (java::GeckoAppShell::OpenUriExternal(
|
||||
if (widget::GeckoAppShell::OpenUriExternal(
|
||||
NS_ConvertUTF8toUTF16(uriSpec), mimeType, EmptyString(),
|
||||
EmptyString(), EmptyString(), EmptyString())) {
|
||||
return NS_OK;
|
||||
|
@ -100,7 +100,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
@ -382,7 +382,7 @@ static nsresult GetDownloadDirectory(nsIFile **_directory,
|
||||
// In the case where we do not have the permission we will start the
|
||||
// download to the app cache directory and later move it to the final
|
||||
// destination after prompting for the permission.
|
||||
auto downloadDir = java::DownloadsIntegration::GetTemporaryDownloadDirectory();
|
||||
auto downloadDir = widget::DownloadsIntegration::GetTemporaryDownloadDirectory();
|
||||
|
||||
nsresult rv;
|
||||
if (downloadDir) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class ANRReporter : public java::ANRReporter::Natives<ANRReporter>
|
||||
class ANRReporter : public widget::ANRReporter::Natives<ANRReporter>
|
||||
{
|
||||
private:
|
||||
ANRReporter();
|
||||
|
@ -57,7 +57,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::jni;
|
||||
using namespace mozilla::java;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
AndroidBridge* AndroidBridge::sBridge = nullptr;
|
||||
pthread_t AndroidBridge::sJavaUiThread;
|
||||
@ -199,12 +199,12 @@ AndroidBridge::AndroidBridge()
|
||||
JNIEnv* const jEnv = jni::GetGeckoThreadEnv();
|
||||
AutoLocalJNIFrame jniFrame(jEnv);
|
||||
|
||||
mClassLoader = Object::GlobalRef(jEnv, java::GeckoThread::ClsLoader());
|
||||
mClassLoader = Object::GlobalRef(jEnv, widget::GeckoThread::ClsLoader());
|
||||
mClassLoaderLoadClass = GetMethodID(
|
||||
jEnv, jEnv->GetObjectClass(mClassLoader.Get()),
|
||||
"loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
|
||||
|
||||
mMessageQueue = java::GeckoThread::MsgQueue();
|
||||
mMessageQueue = widget::GeckoThread::MsgQueue();
|
||||
auto msgQueueClass = Class::LocalRef::Adopt(
|
||||
jEnv, jEnv->GetObjectClass(mMessageQueue.Get()));
|
||||
// mMessageQueueNext must not be null
|
||||
@ -987,7 +987,7 @@ AndroidBridge::HandleGeckoMessage(JSContext* cx, JS::HandleObject object)
|
||||
{
|
||||
ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
|
||||
|
||||
auto message = widget::CreateNativeJSContainer(cx, object);
|
||||
auto message = mozilla::widget::CreateNativeJSContainer(cx, object);
|
||||
GeckoAppShell::HandleGeckoMessageWrapper(message);
|
||||
}
|
||||
|
||||
|
@ -156,8 +156,8 @@ public:
|
||||
bool ProgressiveUpdateCallback(bool aHasPendingNewThebesContent, const LayerRect& aDisplayPort, float aDisplayResolution, bool aDrawingCritical,
|
||||
mozilla::ParentLayerPoint& aScrollOffset, mozilla::CSSToParentLayerScale& aZoom);
|
||||
|
||||
void SetLayerClient(java::GeckoLayerClient::Param jobj);
|
||||
const java::GeckoLayerClient::Ref& GetLayerClient() { return mLayerClient; }
|
||||
void SetLayerClient(widget::GeckoLayerClient::Param jobj);
|
||||
const widget::GeckoLayerClient::Ref& GetLayerClient() { return mLayerClient; }
|
||||
|
||||
bool GetHandlersForURL(const nsAString& aURL,
|
||||
nsIMutableArray* handlersArray = nullptr,
|
||||
@ -342,7 +342,7 @@ protected:
|
||||
nsTArray<nsCOMPtr<nsIMobileMessageCallback>> mSmsRequests;
|
||||
nsTArray<nsCOMPtr<nsIMobileMessageCursorCallback>> mSmsCursorRequests;
|
||||
|
||||
java::GeckoLayerClient::GlobalRef mLayerClient;
|
||||
widget::GeckoLayerClient::GlobalRef mLayerClient;
|
||||
|
||||
// the android.telephony.SmsMessage class
|
||||
jclass mAndroidSmsMessageClass;
|
||||
|
@ -16,7 +16,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
class GeckoNetworkManager final
|
||||
: public java::GeckoNetworkManager::Natives<GeckoNetworkManager>
|
||||
: public widget::GeckoNetworkManager::Natives<GeckoNetworkManager>
|
||||
, public UsesGeckoThreadProxy
|
||||
{
|
||||
GeckoNetworkManager() = delete;
|
||||
|
@ -17,7 +17,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
class GeckoScreenOrientation final
|
||||
: public java::GeckoScreenOrientation::Natives<GeckoScreenOrientation>
|
||||
: public widget::GeckoScreenOrientation::Natives<GeckoScreenOrientation>
|
||||
, public UsesGeckoThreadProxy
|
||||
{
|
||||
GeckoScreenOrientation() = delete;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "mozilla/jni/Natives.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace java {
|
||||
namespace widget {
|
||||
|
||||
template<class Impl>
|
||||
class ANRReporter::Natives : public mozilla::jni::NativeImpl<ANRReporter, Impl>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "mozilla/jni/Accessors.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace java {
|
||||
namespace widget {
|
||||
|
||||
const char ANRReporter::name[] =
|
||||
"org/mozilla/gecko/ANRReporter";
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "mozilla/jni/Refs.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace java {
|
||||
namespace widget {
|
||||
|
||||
class ANRReporter : public mozilla::jni::ObjectBase<ANRReporter, jobject>
|
||||
{
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
||||
java::NativeJSContainer::LocalRef
|
||||
CreateNativeJSContainer(JSContext* cx, JS::HandleObject object);
|
||||
NativeJSContainer::LocalRef CreateNativeJSContainer(
|
||||
JSContext* cx, JS::HandleObject object);
|
||||
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
@ -20,7 +20,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
class PrefsHelper
|
||||
: public java::PrefsHelper::Natives<PrefsHelper>
|
||||
: public widget::PrefsHelper::Natives<PrefsHelper>
|
||||
, public UsesGeckoThreadProxy
|
||||
{
|
||||
PrefsHelper() = delete;
|
||||
@ -40,26 +40,26 @@ class PrefsHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t type = java::PrefsHelper::PREF_INVALID;
|
||||
int32_t type = widget::PrefsHelper::PREF_INVALID;
|
||||
bool boolVal = false;
|
||||
int32_t intVal = 0;
|
||||
nsAutoString strVal;
|
||||
|
||||
switch (varType) {
|
||||
case nsIDataType::VTYPE_BOOL:
|
||||
type = java::PrefsHelper::PREF_BOOL;
|
||||
type = widget::PrefsHelper::PREF_BOOL;
|
||||
if (NS_FAILED(aVariant->GetAsBool(&boolVal))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case nsIDataType::VTYPE_INT32:
|
||||
type = java::PrefsHelper::PREF_INT;
|
||||
type = widget::PrefsHelper::PREF_INT;
|
||||
if (NS_FAILED(aVariant->GetAsInt32(&intVal))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case nsIDataType::VTYPE_ASTRING:
|
||||
type = java::PrefsHelper::PREF_STRING;
|
||||
type = widget::PrefsHelper::PREF_STRING;
|
||||
if (NS_FAILED(aVariant->GetAsAString(strVal))) {
|
||||
return false;
|
||||
}
|
||||
@ -70,17 +70,16 @@ class PrefsHelper
|
||||
|
||||
Maybe<jni::StringParam> jstrVal;
|
||||
jstrVal.emplace(nullptr);
|
||||
if (type == java::PrefsHelper::PREF_STRING) {
|
||||
if (type == widget::PrefsHelper::PREF_STRING) {
|
||||
jstrVal.reset();
|
||||
jstrVal.emplace(strVal, aPrefName.Env());
|
||||
}
|
||||
|
||||
if (aPrefHandler) {
|
||||
java::PrefsHelper::CallPrefHandler(
|
||||
aPrefHandler, type, aPrefName,
|
||||
boolVal, intVal, jstrVal.ref());
|
||||
widget::PrefsHelper::CallPrefHandler(
|
||||
aPrefHandler, type, aPrefName, boolVal, intVal, jstrVal.ref());
|
||||
} else {
|
||||
java::PrefsHelper::OnPrefChange(
|
||||
widget::PrefsHelper::OnPrefChange(
|
||||
aPrefName, type, boolVal, intVal, jstrVal.ref());
|
||||
}
|
||||
return true;
|
||||
@ -98,13 +97,13 @@ class PrefsHelper
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
switch (aType) {
|
||||
case java::PrefsHelper::PREF_BOOL:
|
||||
case widget::PrefsHelper::PREF_BOOL:
|
||||
rv = aVariant->SetAsBool(aBoolVal);
|
||||
break;
|
||||
case java::PrefsHelper::PREF_INT:
|
||||
case widget::PrefsHelper::PREF_INT:
|
||||
rv = aVariant->SetAsInt32(aIntVal);
|
||||
break;
|
||||
case java::PrefsHelper::PREF_STRING:
|
||||
case widget::PrefsHelper::PREF_STRING:
|
||||
rv = aVariant->SetAsAString(aStrVal->ToString());
|
||||
break;
|
||||
}
|
||||
@ -150,23 +149,23 @@ public:
|
||||
jni::String::LocalRef nameStr(mozilla::Move(nameRef));
|
||||
const nsCString& name = nameStr->ToCString();
|
||||
|
||||
int32_t type = java::PrefsHelper::PREF_INVALID;
|
||||
int32_t type = widget::PrefsHelper::PREF_INVALID;
|
||||
bool boolVal = false;
|
||||
int32_t intVal = 0;
|
||||
|
||||
switch (Preferences::GetType(name.get())) {
|
||||
case nsIPrefBranch::PREF_BOOL:
|
||||
type = java::PrefsHelper::PREF_BOOL;
|
||||
type = widget::PrefsHelper::PREF_BOOL;
|
||||
boolVal = Preferences::GetBool(name.get());
|
||||
break;
|
||||
|
||||
case nsIPrefBranch::PREF_INT:
|
||||
type = java::PrefsHelper::PREF_INT;
|
||||
type = widget::PrefsHelper::PREF_INT;
|
||||
intVal = Preferences::GetInt(name.get());
|
||||
break;
|
||||
|
||||
case nsIPrefBranch::PREF_STRING:
|
||||
type = java::PrefsHelper::PREF_STRING;
|
||||
type = widget::PrefsHelper::PREF_STRING;
|
||||
strVal = Preferences::GetLocalizedString(name.get());
|
||||
if (!strVal) {
|
||||
strVal = Preferences::GetString(name.get());
|
||||
@ -196,18 +195,17 @@ public:
|
||||
|
||||
Maybe<jni::StringParam> jstrVal;
|
||||
jstrVal.emplace(nullptr);
|
||||
if (type == java::PrefsHelper::PREF_STRING) {
|
||||
if (type == widget::PrefsHelper::PREF_STRING) {
|
||||
jstrVal.reset();
|
||||
jstrVal.emplace(strVal, aCls.Env());
|
||||
}
|
||||
|
||||
java::PrefsHelper::CallPrefHandler(
|
||||
aPrefHandler, type, nameStr,
|
||||
boolVal, intVal, jstrVal.ref());
|
||||
widget::PrefsHelper::CallPrefHandler(
|
||||
aPrefHandler, type, nameStr, boolVal, intVal, jstrVal.ref());
|
||||
}
|
||||
|
||||
java::PrefsHelper::CallPrefHandler(
|
||||
aPrefHandler, java::PrefsHelper::PREF_FINISH,
|
||||
widget::PrefsHelper::CallPrefHandler(
|
||||
aPrefHandler, widget::PrefsHelper::PREF_FINISH,
|
||||
nullptr, false, 0, nullptr);
|
||||
}
|
||||
|
||||
@ -235,13 +233,13 @@ public:
|
||||
}
|
||||
|
||||
switch (aType) {
|
||||
case java::PrefsHelper::PREF_BOOL:
|
||||
case widget::PrefsHelper::PREF_BOOL:
|
||||
Preferences::SetBool(name.get(), aBoolVal);
|
||||
break;
|
||||
case java::PrefsHelper::PREF_INT:
|
||||
case widget::PrefsHelper::PREF_INT:
|
||||
Preferences::SetInt(name.get(), aIntVal);
|
||||
break;
|
||||
case java::PrefsHelper::PREF_STRING:
|
||||
case widget::PrefsHelper::PREF_STRING:
|
||||
Preferences::SetString(name.get(), aStrVal->ToString());
|
||||
break;
|
||||
default:
|
||||
@ -303,15 +301,15 @@ public:
|
||||
|
||||
switch (Preferences::GetType(name.get())) {
|
||||
case nsIPrefBranch::PREF_BOOL:
|
||||
type = java::PrefsHelper::PREF_BOOL;
|
||||
type = widget::PrefsHelper::PREF_BOOL;
|
||||
boolVal = Preferences::GetBool(name.get());
|
||||
break;
|
||||
case nsIPrefBranch::PREF_INT:
|
||||
type = java::PrefsHelper::PREF_INT;
|
||||
type = widget::PrefsHelper::PREF_INT;
|
||||
intVal = Preferences::GetInt(name.get());
|
||||
break;
|
||||
case nsIPrefBranch::PREF_STRING:
|
||||
type = java::PrefsHelper::PREF_STRING;
|
||||
type = widget::PrefsHelper::PREF_STRING;
|
||||
strVal = Preferences::GetLocalizedString(name.get());
|
||||
if (!strVal) {
|
||||
strVal = Preferences::GetString(name.get());
|
||||
@ -325,13 +323,12 @@ public:
|
||||
|
||||
Maybe<jni::StringParam> jstrVal;
|
||||
jstrVal.emplace(nullptr);
|
||||
if (type == java::PrefsHelper::PREF_STRING) {
|
||||
if (type == widget::PrefsHelper::PREF_STRING) {
|
||||
jstrVal.reset();
|
||||
jstrVal.emplace(strVal);
|
||||
}
|
||||
|
||||
java::PrefsHelper::OnPrefChange(
|
||||
name, type, boolVal, intVal, jstrVal.ref());
|
||||
widget::PrefsHelper::OnPrefChange(name, type, boolVal, intVal, jstrVal.ref());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
class ThumbnailHelper final
|
||||
: public java::ThumbnailHelper::Natives<ThumbnailHelper>
|
||||
: public widget::ThumbnailHelper::Natives<ThumbnailHelper>
|
||||
, public jni::UsesNativeCallProxy
|
||||
{
|
||||
ThumbnailHelper() = delete;
|
||||
@ -234,7 +234,7 @@ public:
|
||||
!tab ||
|
||||
NS_FAILED(tab->GetWindow(getter_AddRefs(window))) ||
|
||||
!window) {
|
||||
java::ThumbnailHelper::SendThumbnail(
|
||||
widget::ThumbnailHelper::SendThumbnail(
|
||||
aData, aTabId, /* success */ false, /* store */ false);
|
||||
return;
|
||||
}
|
||||
@ -244,7 +244,7 @@ public:
|
||||
const bool success = !!docShell;
|
||||
const bool store = success ? ShouldStoreThumbnail(docShell) : false;
|
||||
|
||||
java::ThumbnailHelper::SendThumbnail(aData, aTabId, success, store);
|
||||
widget::ThumbnailHelper::SendThumbnail(aData, aTabId, success, store);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -152,7 +152,7 @@ bool HandleUncaughtException(JNIEnv* aEnv)
|
||||
MOZ_ASSERT(e);
|
||||
|
||||
aEnv->ExceptionClear();
|
||||
String::LocalRef stack = java::GeckoAppShell::HandleUncaughtException(e);
|
||||
String::LocalRef stack = widget::GeckoAppShell::HandleUncaughtException(e);
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
if (stack) {
|
||||
|
@ -21,7 +21,7 @@ class AndroidInputStream : public nsIInputStream
|
||||
{
|
||||
public:
|
||||
AndroidInputStream(jni::Object::Param connection) {
|
||||
mBridgeInputStream = java::GeckoAppShell::CreateInputStream(connection);
|
||||
mBridgeInputStream = widget::GeckoAppShell::CreateInputStream(connection);
|
||||
mBridgeChannel = AndroidBridge::ChannelCreate(mBridgeInputStream);
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ private:
|
||||
mConnection = aConnection;
|
||||
SetURI(aURI);
|
||||
|
||||
auto type = java::GeckoAppShell::ConnectionGetMimeType(mConnection);
|
||||
auto type = widget::GeckoAppShell::ConnectionGetMimeType(mConnection);
|
||||
if (type) {
|
||||
SetContentType(type->ToCString());
|
||||
}
|
||||
@ -82,7 +82,7 @@ public:
|
||||
nsCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
|
||||
auto connection = java::GeckoAppShell::GetConnection(spec);
|
||||
auto connection = widget::GeckoAppShell::GetConnection(spec);
|
||||
return connection ? new AndroidChannel(aURI, connection) : nullptr;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
NS_DECL_ISUPPORTS;
|
||||
|
||||
nsresult Callback(const nsAString& topic, const nsAString& state) override {
|
||||
java::GeckoAppShell::NotifyWakeLockChanged(topic, state);
|
||||
widget::GeckoAppShell::NotifyWakeLockChanged(topic, state);
|
||||
return NS_OK;
|
||||
}
|
||||
};
|
||||
@ -136,7 +136,7 @@ StaticRefPtr<WakeLockListener> sWakeLockListener;
|
||||
|
||||
|
||||
class GeckoThreadSupport final
|
||||
: public java::GeckoThread::Natives<GeckoThreadSupport>
|
||||
: public widget::GeckoThread::Natives<GeckoThreadSupport>
|
||||
, public UsesGeckoThreadProxy
|
||||
{
|
||||
static uint32_t sPauseCount;
|
||||
@ -256,7 +256,7 @@ uint32_t GeckoThreadSupport::sPauseCount;
|
||||
|
||||
|
||||
class GeckoAppShellSupport final
|
||||
: public java::GeckoAppShell::Natives<GeckoAppShellSupport>
|
||||
: public widget::GeckoAppShell::Natives<GeckoAppShellSupport>
|
||||
, public UsesGeckoThreadProxy
|
||||
{
|
||||
public:
|
||||
@ -392,7 +392,7 @@ nsAppShell::nsAppShell()
|
||||
mozilla::ThumbnailHelper::Init();
|
||||
nsWindow::InitNatives();
|
||||
|
||||
java::GeckoThread::SetState(java::GeckoThread::State::JNI_READY());
|
||||
widget::GeckoThread::SetState(widget::GeckoThread::State::JNI_READY());
|
||||
}
|
||||
|
||||
sPowerManagerService = do_GetService(POWERMANAGERSERVICE_CONTRACTID);
|
||||
@ -494,11 +494,11 @@ nsAppShell::Observe(nsISupports* aSubject,
|
||||
if (jni::IsAvailable()) {
|
||||
// See if we want to force 16-bit color before doing anything
|
||||
if (Preferences::GetBool("gfx.android.rgb16.force", false)) {
|
||||
java::GeckoAppShell::SetScreenDepthOverride(16);
|
||||
widget::GeckoAppShell::SetScreenDepthOverride(16);
|
||||
}
|
||||
|
||||
java::GeckoThread::SetState(
|
||||
java::GeckoThread::State::PROFILE_READY());
|
||||
widget::GeckoThread::SetState(
|
||||
widget::GeckoThread::State::PROFILE_READY());
|
||||
|
||||
// Gecko on Android follows the Android app model where it never
|
||||
// stops until it is killed by the system or told explicitly to
|
||||
@ -516,16 +516,16 @@ nsAppShell::Observe(nsISupports* aSubject,
|
||||
} else if (!strcmp(aTopic, "chrome-document-loaded")) {
|
||||
if (jni::IsAvailable()) {
|
||||
// Our first window has loaded, assume any JS initialization has run.
|
||||
java::GeckoThread::CheckAndSetState(
|
||||
java::GeckoThread::State::PROFILE_READY(),
|
||||
java::GeckoThread::State::RUNNING());
|
||||
widget::GeckoThread::CheckAndSetState(
|
||||
widget::GeckoThread::State::PROFILE_READY(),
|
||||
widget::GeckoThread::State::RUNNING());
|
||||
}
|
||||
removeObserver = true;
|
||||
|
||||
} else if (!strcmp(aTopic, "quit-application-granted")) {
|
||||
if (jni::IsAvailable()) {
|
||||
java::GeckoThread::SetState(
|
||||
java::GeckoThread::State::EXITING());
|
||||
widget::GeckoThread::SetState(
|
||||
widget::GeckoThread::State::EXITING());
|
||||
|
||||
// We are told explicitly to quit, perhaps due to
|
||||
// nsIAppStartup::Quit being called. We should release our hold on
|
||||
@ -865,7 +865,8 @@ nsAppShell::LegacyGeckoEvent::Run()
|
||||
dom::GamepadMappingType::Standard,
|
||||
dom::kStandardGamepadButtons,
|
||||
dom::kStandardGamepadAxes);
|
||||
java::GeckoAppShell::GamepadAdded(curEvent->ID(), svc_id);
|
||||
widget::GeckoAppShell::GamepadAdded(curEvent->ID(),
|
||||
svc_id);
|
||||
} else if (curEvent->Action() == AndroidGeckoEvent::ACTION_GAMEPAD_REMOVED) {
|
||||
service->RemoveGamepad(curEvent->ID());
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ nsClipboard::SetData(nsITransferable *aTransferable,
|
||||
nsAutoString buffer;
|
||||
supportsString->GetData(buffer);
|
||||
|
||||
java::Clipboard::SetClipboardText(buffer);
|
||||
widget::Clipboard::SetClipboardText(buffer);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ nsClipboard::EmptyClipboard(int32_t aWhichClipboard)
|
||||
{
|
||||
if (aWhichClipboard != kGlobalClipboard)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
java::Clipboard::ClearText();
|
||||
widget::Clipboard::ClearText();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -100,7 +100,7 @@ nsClipboard::HasDataMatchingFlavors(const char **aFlavorList,
|
||||
|
||||
for (uint32_t k = 0; k < aLength; k++) {
|
||||
if (strcmp(aFlavorList[k], kUnicodeMime) == 0) {
|
||||
*aHasText = java::Clipboard::HasText();
|
||||
*aHasText = widget::Clipboard::HasText();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ nsLookAndFeel::GetEchoPasswordImpl()
|
||||
{
|
||||
if (!mInitializedShowPassword) {
|
||||
if (XRE_IsParentProcess()) {
|
||||
mShowPassword = java::GeckoAppShell::GetShowPasswordSetting();
|
||||
mShowPassword = widget::GeckoAppShell::GetShowPasswordSetting();
|
||||
} else {
|
||||
ContentChild::GetSingleton()->SendGetShowPasswordSetting(&mShowPassword);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "nsScreenManagerAndroid.h"
|
||||
#include "nsWindow.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidRect.h"
|
||||
#include <mozilla/jni/Refs.h>
|
||||
@ -37,7 +38,7 @@ nsScreenAndroid::GetRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, i
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
java::sdk::Rect::LocalRef rect = java::GeckoAppShell::GetScreenSize();
|
||||
widget::sdk::Rect::LocalRef rect = widget::GeckoAppShell::GetScreenSize();
|
||||
rect->Left(outLeft);
|
||||
rect->Top(outTop);
|
||||
rect->Width(outWidth);
|
||||
@ -64,7 +65,7 @@ nsScreenAndroid::GetPixelDepth(int32_t *aPixelDepth)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
*aPixelDepth = java::GeckoAppShell::GetScreenDepthWrapper();
|
||||
*aPixelDepth = widget::GeckoAppShell::GetScreenDepthWrapper();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -79,7 +80,7 @@ void
|
||||
nsScreenAndroid::ApplyMinimumBrightness(uint32_t aBrightness)
|
||||
{
|
||||
if (mozilla::jni::IsAvailable()) {
|
||||
java::GeckoAppShell::SetKeepScreenOn(aBrightness == BRIGHTNESS_FULL);
|
||||
widget::GeckoAppShell::SetKeepScreenOn(aBrightness == BRIGHTNESS_FULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,8 @@ using mozilla::Unused;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::java;
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla::layers;
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsWindow, nsBaseWidget)
|
||||
|
||||
@ -278,7 +277,8 @@ private:
|
||||
, mOldEnd(aIMENotification.mTextChangeData.mRemovedEndOffset)
|
||||
, mNewEnd(aIMENotification.mTextChangeData.mAddedEndOffset)
|
||||
{
|
||||
MOZ_ASSERT(aIMENotification.mMessage == NOTIFY_IME_OF_TEXT_CHANGE,
|
||||
MOZ_ASSERT(aIMENotification.mMessage ==
|
||||
mozilla::widget::NOTIFY_IME_OF_TEXT_CHANGE,
|
||||
"IMETextChange initialized with wrong notification");
|
||||
MOZ_ASSERT(aIMENotification.mTextChangeData.IsValid(),
|
||||
"The text change notification isn't initialized");
|
||||
@ -290,7 +290,7 @@ private:
|
||||
};
|
||||
|
||||
// GeckoEditable instance used by this nsWindow;
|
||||
java::GeckoEditable::GlobalRef mEditable;
|
||||
mozilla::widget::GeckoEditable::GlobalRef mEditable;
|
||||
AutoTArray<mozilla::UniquePtr<mozilla::WidgetEvent>, 8> mIMEKeyEvents;
|
||||
AutoTArray<IMETextChange, 4> mIMETextChanges;
|
||||
InputContext mInputContext;
|
||||
@ -568,13 +568,13 @@ public:
|
||||
MouseInput::ButtonType result = MouseInput::NONE;
|
||||
|
||||
switch (button) {
|
||||
case java::sdk::MotionEvent::BUTTON_PRIMARY:
|
||||
case widget::sdk::MotionEvent::BUTTON_PRIMARY:
|
||||
result = MouseInput::LEFT_BUTTON;
|
||||
break;
|
||||
case java::sdk::MotionEvent::BUTTON_SECONDARY:
|
||||
case widget::sdk::MotionEvent::BUTTON_SECONDARY:
|
||||
result = MouseInput::RIGHT_BUTTON;
|
||||
break;
|
||||
case java::sdk::MotionEvent::BUTTON_TERTIARY:
|
||||
case widget::sdk::MotionEvent::BUTTON_TERTIARY:
|
||||
result = MouseInput::MIDDLE_BUTTON;
|
||||
break;
|
||||
default:
|
||||
@ -587,19 +587,19 @@ public:
|
||||
static int16_t ConvertButtons(int buttons) {
|
||||
int16_t result = 0;
|
||||
|
||||
if (buttons & java::sdk::MotionEvent::BUTTON_PRIMARY) {
|
||||
if (buttons & widget::sdk::MotionEvent::BUTTON_PRIMARY) {
|
||||
result |= WidgetMouseEventBase::eLeftButtonFlag;
|
||||
}
|
||||
if (buttons & java::sdk::MotionEvent::BUTTON_SECONDARY) {
|
||||
if (buttons & widget::sdk::MotionEvent::BUTTON_SECONDARY) {
|
||||
result |= WidgetMouseEventBase::eRightButtonFlag;
|
||||
}
|
||||
if (buttons & java::sdk::MotionEvent::BUTTON_TERTIARY) {
|
||||
if (buttons & widget::sdk::MotionEvent::BUTTON_TERTIARY) {
|
||||
result |= WidgetMouseEventBase::eMiddleButtonFlag;
|
||||
}
|
||||
if (buttons & java::sdk::MotionEvent::BUTTON_BACK) {
|
||||
if (buttons & widget::sdk::MotionEvent::BUTTON_BACK) {
|
||||
result |= WidgetMouseEventBase::e4thButtonFlag;
|
||||
}
|
||||
if (buttons & java::sdk::MotionEvent::BUTTON_FORWARD) {
|
||||
if (buttons & widget::sdk::MotionEvent::BUTTON_FORWARD) {
|
||||
result |= WidgetMouseEventBase::e5thButtonFlag;
|
||||
}
|
||||
|
||||
@ -2466,7 +2466,7 @@ ConvertAndroidScanCodeToCodeNameIndex(int scanCode)
|
||||
static bool
|
||||
IsModifierKey(int32_t keyCode)
|
||||
{
|
||||
using mozilla::java::sdk::KeyEvent;
|
||||
using mozilla::widget::sdk::KeyEvent;
|
||||
return keyCode == KeyEvent::KEYCODE_ALT_LEFT ||
|
||||
keyCode == KeyEvent::KEYCODE_ALT_RIGHT ||
|
||||
keyCode == KeyEvent::KEYCODE_SHIFT_LEFT ||
|
||||
@ -2480,7 +2480,7 @@ IsModifierKey(int32_t keyCode)
|
||||
static Modifiers
|
||||
GetModifiers(int32_t metaState)
|
||||
{
|
||||
using mozilla::java::sdk::KeyEvent;
|
||||
using mozilla::widget::sdk::KeyEvent;
|
||||
return (metaState & KeyEvent::META_ALT_MASK ? MODIFIER_ALT : 0)
|
||||
| (metaState & KeyEvent::META_SHIFT_MASK ? MODIFIER_SHIFT : 0)
|
||||
| (metaState & KeyEvent::META_CTRL_MASK ? MODIFIER_CONTROL : 0)
|
||||
|
@ -249,7 +249,7 @@ private:
|
||||
void CreateLayerManager(int aCompositorWidth, int aCompositorHeight);
|
||||
void RedrawAll();
|
||||
|
||||
mozilla::java::LayerRenderer::Frame::GlobalRef mLayerRendererFrame;
|
||||
mozilla::widget::LayerRenderer::Frame::GlobalRef mLayerRendererFrame;
|
||||
};
|
||||
|
||||
#endif /* NSWINDOW_H_ */
|
||||
|
@ -867,7 +867,7 @@ nsSystemInfo::GetAndroidSystemInfo(AndroidSystemInfo* aInfo)
|
||||
sdk_version = 0;
|
||||
}
|
||||
aInfo->sdk_version() = sdk_version;
|
||||
aInfo->isTablet() = java::GeckoAppShell::IsTablet();
|
||||
aInfo->isTablet() = mozilla::widget::GeckoAppShell::IsTablet();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -585,7 +585,7 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION",
|
||||
"RELEASE",
|
||||
osVersion);
|
||||
isTablet = java::GeckoAppShell::IsTablet();
|
||||
isTablet = mozilla::widget::GeckoAppShell::IsTablet();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -61,7 +61,7 @@ static nsresult MacErrorMapper(OSErr inErr);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsIMIMEService.h"
|
||||
#include <linux/magic.h>
|
||||
#endif
|
||||
@ -2023,7 +2023,7 @@ nsLocalFile::Launch()
|
||||
}
|
||||
|
||||
nsAutoCString fileUri = NS_LITERAL_CSTRING("file://") + mPath;
|
||||
return java::GeckoAppShell::OpenUriExternal(
|
||||
return widget::GeckoAppShell::OpenUriExternal(
|
||||
NS_ConvertUTF8toUTF16(fileUri),
|
||||
NS_ConvertUTF8toUTF16(type),
|
||||
EmptyString(),
|
||||
|
Loading…
Reference in New Issue
Block a user