Bug 1077559 - Rename APZCCallbackHandler to AndroidContentController. r=botond

--HG--
rename : widget/android/APZCCallbackHandler.cpp => widget/android/AndroidContentController.cpp
rename : widget/android/APZCCallbackHandler.h => widget/android/AndroidContentController.h
This commit is contained in:
Kartikaya Gupta 2015-04-24 22:26:51 -04:00
parent 31d9c52179
commit 3a9fe61cf2
5 changed files with 19 additions and 19 deletions

View File

@ -3,7 +3,7 @@
* 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 "APZCCallbackHandler.h"
#include "AndroidContentController.h"
#include "mozilla/layers/APZCTreeManager.h"
#include "base/message_loop.h"
#include "nsWindow.h"
@ -15,10 +15,10 @@ namespace mozilla {
namespace widget {
namespace android {
NativePanZoomController::GlobalRef APZCCallbackHandler::sNativePanZoomController = nullptr;
NativePanZoomController::GlobalRef AndroidContentController::sNativePanZoomController = nullptr;
NativePanZoomController::LocalRef
APZCCallbackHandler::SetNativePanZoomController(NativePanZoomController::Param obj)
AndroidContentController::SetNativePanZoomController(NativePanZoomController::Param obj)
{
NativePanZoomController::LocalRef old = sNativePanZoomController;
sNativePanZoomController = obj;
@ -26,7 +26,7 @@ APZCCallbackHandler::SetNativePanZoomController(NativePanZoomController::Param o
}
void
APZCCallbackHandler::NotifyDefaultPrevented(uint64_t aInputBlockId,
AndroidContentController::NotifyDefaultPrevented(uint64_t aInputBlockId,
bool aDefaultPrevented)
{
if (!AndroidBridge::IsJavaUiThread()) {
@ -34,7 +34,7 @@ APZCCallbackHandler::NotifyDefaultPrevented(uint64_t aInputBlockId,
// APZ "controller" thread) but we get it from the Gecko thread, so we
// have to throw it onto the other thread.
AndroidBridge::Bridge()->PostTaskToUiThread(NewRunnableFunction(
&APZCCallbackHandler::NotifyDefaultPrevented,
&AndroidContentController::NotifyDefaultPrevented,
aInputBlockId, aDefaultPrevented), 0);
return;
}
@ -47,7 +47,7 @@ APZCCallbackHandler::NotifyDefaultPrevented(uint64_t aInputBlockId,
}
void
APZCCallbackHandler::PostDelayedTask(Task* aTask, int aDelayMs)
AndroidContentController::PostDelayedTask(Task* aTask, int aDelayMs)
{
AndroidBridge::Bridge()->PostTaskToUiThread(aTask, aDelayMs);
}

View File

@ -3,8 +3,8 @@
* 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 APZCCallbackHandler_h__
#define APZCCallbackHandler_h__
#ifndef AndroidContentController_h__
#define AndroidContentController_h__
#include "mozilla/layers/ChromeProcessController.h"
#include "mozilla/layers/APZEventState.h"
@ -19,10 +19,10 @@ namespace mozilla {
namespace widget {
namespace android {
class APZCCallbackHandler final : public mozilla::layers::ChromeProcessController
class AndroidContentController final : public mozilla::layers::ChromeProcessController
{
public:
APZCCallbackHandler(nsIWidget* aWidget, mozilla::layers::APZEventState* aAPZEventState)
AndroidContentController(nsIWidget* aWidget, mozilla::layers::APZEventState* aAPZEventState)
: mozilla::layers::ChromeProcessController(aWidget, aAPZEventState)
{}

View File

@ -8,8 +8,8 @@
#include "nsString.h"
#include "AndroidBridge.h"
#include "AndroidContentController.h"
#include "AndroidGraphicBuffer.h"
#include "APZCCallbackHandler.h"
#include <jni.h>
#include <pthread.h>
@ -924,7 +924,7 @@ Java_org_mozilla_gecko_gfx_NativePanZoomController_init(JNIEnv* env, jobject ins
const auto& newRef = NativePanZoomController::Ref::From(instance);
NativePanZoomController::LocalRef oldRef =
APZCCallbackHandler::SetNativePanZoomController(newRef);
AndroidContentController::SetNativePanZoomController(newRef);
MOZ_ASSERT(!oldRef, "Registering a new NPZC when we already have one");
}
@ -968,7 +968,7 @@ Java_org_mozilla_gecko_gfx_NativePanZoomController_destroy(JNIEnv* env, jobject
}
NativePanZoomController::LocalRef oldRef =
APZCCallbackHandler::SetNativePanZoomController(nullptr);
AndroidContentController::SetNativePanZoomController(nullptr);
MOZ_ASSERT(oldRef, "Clearing a non-existent NPZC");
}

View File

@ -24,12 +24,12 @@ EXPORTS += [
SOURCES += [
'AndroidBridge.cpp',
'AndroidContentController.cpp',
'AndroidDirectTexture.cpp',
'AndroidGraphicBuffer.cpp',
'AndroidJavaWrappers.cpp',
'AndroidJNI.cpp',
'AndroidJNIWrapper.cpp',
'APZCCallbackHandler.cpp',
'GeneratedJNIWrappers.cpp',
'GfxInfo.cpp',
'NativeJSContainer.cpp',

View File

@ -51,7 +51,7 @@ using mozilla::unused;
#include "GLContextProvider.h"
#include "ScopedGLHelpers.h"
#include "mozilla/layers/CompositorOGL.h"
#include "APZCCallbackHandler.h"
#include "AndroidContentController.h"
#include "nsTArray.h"
@ -1077,7 +1077,7 @@ bool nsWindow::OnMultitouchEvent(AndroidGeckoEvent *ae)
// previous block should not be default-prevented
bool defaultPrevented = isDownEvent ? false : preventDefaultActions;
if (ae->Type() == AndroidGeckoEvent::APZ_INPUT_EVENT) {
widget::android::APZCCallbackHandler::NotifyDefaultPrevented(ae->ApzInputBlockId(), defaultPrevented);
widget::android::AndroidContentController::NotifyDefaultPrevented(ae->ApzInputBlockId(), defaultPrevented);
} else {
GeckoAppShell::NotifyDefaultPrevented(defaultPrevented);
}
@ -1090,7 +1090,7 @@ bool nsWindow::OnMultitouchEvent(AndroidGeckoEvent *ae)
if (isDownEvent) {
if (preventDefaultActions) {
if (ae->Type() == AndroidGeckoEvent::APZ_INPUT_EVENT) {
widget::android::APZCCallbackHandler::NotifyDefaultPrevented(ae->ApzInputBlockId(), true);
widget::android::AndroidContentController::NotifyDefaultPrevented(ae->ApzInputBlockId(), true);
} else {
GeckoAppShell::NotifyDefaultPrevented(true);
}
@ -2492,7 +2492,7 @@ nsWindow::ConfigureAPZControllerThread()
already_AddRefed<GeckoContentController>
nsWindow::CreateRootContentController()
{
nsRefPtr<GeckoContentController> controller = new widget::android::APZCCallbackHandler(this, mAPZEventState);
nsRefPtr<GeckoContentController> controller = new widget::android::AndroidContentController(this, mAPZEventState);
return controller.forget();
}