Skip to content

Commit

Permalink
Change unused to Unused
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Dec 19, 2016
1 parent 041bc56 commit 42c8b4c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 55 deletions.
22 changes: 11 additions & 11 deletions embedding/embedlite/EmbedLiteApp.cpp
Expand Up @@ -239,7 +239,7 @@ void
EmbedLiteApp::AddManifestLocation(const char* manifest)
{
if (mState == INITIALIZED) {
unused << mAppParent->SendLoadComponentManifest(nsDependentCString(manifest));
Unused << mAppParent->SendLoadComponentManifest(nsDependentCString(manifest));
} else {
sComponentDirs.AppendElement(nsCString(manifest));
}
Expand Down Expand Up @@ -306,7 +306,7 @@ EmbedLiteApp::PreDestroy(EmbedLiteApp* app)
LOGE("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!app->mAppParent is null, wrong logic?");
return;
}
unused << app->mAppParent->SendPreDestroy();
Unused << app->mAppParent->SendPreDestroy();
}

void
Expand Down Expand Up @@ -371,65 +371,65 @@ EmbedLiteApp::SetBoolPref(const char* aName, bool aValue)
{
NS_ENSURE_TRUE(mState == INITIALIZED, );
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendSetBoolPref(nsDependentCString(aName), aValue);
Unused << mAppParent->SendSetBoolPref(nsDependentCString(aName), aValue);
}

void
EmbedLiteApp::SetCharPref(const char* aName, const char* aValue)
{
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendSetCharPref(nsDependentCString(aName), nsDependentCString(aValue));
Unused << mAppParent->SendSetCharPref(nsDependentCString(aName), nsDependentCString(aValue));
}

void
EmbedLiteApp::SetIntPref(const char* aName, int aValue)
{
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendSetIntPref(nsDependentCString(aName), aValue);
Unused << mAppParent->SendSetIntPref(nsDependentCString(aName), aValue);
}

void
EmbedLiteApp::LoadGlobalStyleSheet(const char* aUri, bool aEnable)
{
LOGT();
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendLoadGlobalStyleSheet(nsDependentCString(aUri), aEnable);
Unused << mAppParent->SendLoadGlobalStyleSheet(nsDependentCString(aUri), aEnable);
}

void
EmbedLiteApp::SendObserve(const char* aMessageName, const char16_t* aMessage)
{
LOGT("topic:%s", aMessageName);
NS_ENSURE_TRUE(mState == INITIALIZED, );
unused << mAppParent->SendObserve(nsDependentCString(aMessageName), aMessage ? nsDependentString((const char16_t*)aMessage) : nsString());
Unused << mAppParent->SendObserve(nsDependentCString(aMessageName), aMessage ? nsDependentString((const char16_t*)aMessage) : nsString());
}

void
EmbedLiteApp::AddObserver(const char* aMessageName)
{
LOGT("topic:%s", aMessageName);
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendAddObserver(nsDependentCString(aMessageName));
Unused << mAppParent->SendAddObserver(nsDependentCString(aMessageName));
}

void
EmbedLiteApp::RemoveObserver(const char* aMessageName)
{
LOGT("topic:%s", aMessageName);
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendRemoveObserver(nsDependentCString(aMessageName));
Unused << mAppParent->SendRemoveObserver(nsDependentCString(aMessageName));
}

void EmbedLiteApp::AddObservers(nsTArray<nsCString>& observersList)
{
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendAddObservers(observersList);
Unused << mAppParent->SendAddObservers(observersList);
}

void EmbedLiteApp::RemoveObservers(nsTArray<nsCString>& observersList)
{
NS_ASSERTION(mState == INITIALIZED, "Wrong timing");
unused << mAppParent->SendRemoveObservers(observersList);
Unused << mAppParent->SendRemoveObservers(observersList);
}

EmbedLiteView*
Expand Down
40 changes: 20 additions & 20 deletions embedding/embedlite/EmbedLiteView.cpp
Expand Up @@ -49,7 +49,7 @@ void
EmbedLiteView::Destroy()
{
MOZ_ASSERT(mViewParent);
unused << mViewParent->SendDestroy();
Unused << mViewParent->SendDestroy();
}

void
Expand Down Expand Up @@ -83,15 +83,15 @@ void
EmbedLiteView::LoadURL(const char* aUrl)
{
LOGT("url:%s", aUrl);
unused << mViewParent->SendLoadURL(NS_ConvertUTF8toUTF16(nsDependentCString(aUrl)));
Unused << mViewParent->SendLoadURL(NS_ConvertUTF8toUTF16(nsDependentCString(aUrl)));
}

void
EmbedLiteView::SetIsActive(bool aIsActive)
{
LOGT("active: %d", aIsActive);
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendSetIsActive(aIsActive);
Unused << mViewParent->SendSetIsActive(aIsActive);
// Make sure active view content controller is always registered with
// APZCTreeManager for the window.
if (aIsActive) {
Expand All @@ -104,107 +104,107 @@ EmbedLiteView::SetIsFocused(bool aIsFocused)
{
LOGT();
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendSetIsFocused(aIsFocused);
Unused << mViewParent->SendSetIsFocused(aIsFocused);
}

void
EmbedLiteView::SetThrottlePainting(bool aThrottle)
{
LOGT();
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendSetThrottlePainting(aThrottle);
Unused << mViewParent->SendSetThrottlePainting(aThrottle);
}

void
EmbedLiteView::SuspendTimeouts()
{
LOGT();
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendSuspendTimeouts();
Unused << mViewParent->SendSuspendTimeouts();
}

void
EmbedLiteView::ResumeTimeouts()
{
LOGT();
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendResumeTimeouts();
Unused << mViewParent->SendResumeTimeouts();
}

void EmbedLiteView::GoBack()
{
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendGoBack();
Unused << mViewParent->SendGoBack();

}

void EmbedLiteView::GoForward()
{
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendGoForward();
Unused << mViewParent->SendGoForward();
}

void EmbedLiteView::StopLoad()
{
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendStopLoad();
Unused << mViewParent->SendStopLoad();

}

void EmbedLiteView::Reload(bool hard)
{
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendReload(hard);
Unused << mViewParent->SendReload(hard);
}

void EmbedLiteView::ScrollTo(int x, int y)
{
LOGT();
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendScrollTo(x, y);
Unused << mViewParent->SendScrollTo(x, y);
}

void EmbedLiteView::ScrollBy(int x, int y)
{
LOGT();
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendScrollBy(x, y);
Unused << mViewParent->SendScrollBy(x, y);
}

void
EmbedLiteView::LoadFrameScript(const char* aURI)
{
LOGT("uri:%s, mViewImpl:%p", aURI, mViewImpl);
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendLoadFrameScript(NS_ConvertUTF8toUTF16(nsDependentCString(aURI)));
Unused << mViewParent->SendLoadFrameScript(NS_ConvertUTF8toUTF16(nsDependentCString(aURI)));
}

void
EmbedLiteView::AddMessageListener(const char* aName)
{
LOGT("name:%s", aName);
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendAddMessageListener(nsDependentCString(aName));
Unused << mViewParent->SendAddMessageListener(nsDependentCString(aName));
}

void
EmbedLiteView::RemoveMessageListener(const char* aName)
{
LOGT("name:%s", aName);
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendRemoveMessageListener(nsDependentCString(aName));
Unused << mViewParent->SendRemoveMessageListener(nsDependentCString(aName));
}

void EmbedLiteView::AddMessageListeners(const nsTArray<nsString>& aMessageNames)
{
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendAddMessageListeners(aMessageNames);
Unused << mViewParent->SendAddMessageListeners(aMessageNames);
}

void EmbedLiteView::RemoveMessageListeners(const nsTArray<nsString>& aMessageNames)
{
NS_ENSURE_TRUE(mViewParent, );
unused << mViewParent->SendRemoveMessageListeners(aMessageNames);
Unused << mViewParent->SendRemoveMessageListeners(aMessageNames);
}

void
Expand All @@ -214,15 +214,15 @@ EmbedLiteView::SendAsyncMessage(const char16_t* aMessageName, const char16_t* aM

const nsDependentString msgname(aMessageName);
const nsDependentString msg(aMessage);
unused << mViewParent->SendAsyncMessage(msgname, msg);
Unused << mViewParent->SendAsyncMessage(msgname, msg);
}

// Render interface

void
EmbedLiteView::SetMargins(int top, int right, int bottom, int left)
{
unused << mViewParent->SendSetMargins(top, right, bottom, left);
Unused << mViewParent->SendSetMargins(top, right, bottom, left);
}

void
Expand Down
6 changes: 3 additions & 3 deletions embedding/embedlite/EmbedLiteWindow.cpp
Expand Up @@ -37,7 +37,7 @@ EmbedLiteWindow::~EmbedLiteWindow()

void EmbedLiteWindow::Destroy()
{
unused << mWindowParent->SendDestroy();
Unused << mWindowParent->SendDestroy();
}

void EmbedLiteWindow::Destroyed()
Expand All @@ -60,7 +60,7 @@ EmbedLiteWindowListener* const EmbedLiteWindow::GetListener() const

void EmbedLiteWindow::SetSize(int width, int height)
{
unused << mWindowParent->SendSetSize(gfxSize(width, height));
Unused << mWindowParent->SendSetSize(gfxSize(width, height));
}

uint32_t EmbedLiteWindow::GetUniqueID() const
Expand All @@ -70,7 +70,7 @@ uint32_t EmbedLiteWindow::GetUniqueID() const

void EmbedLiteWindow::SetContentOrientation(mozilla::ScreenRotation rotation)
{
unused << mWindowParent->SendSetContentOrientation(rotation);
Unused << mWindowParent->SendSetContentOrientation(rotation);
}

void EmbedLiteWindow::ScheduleUpdate()
Expand Down
Expand Up @@ -120,7 +120,7 @@ EmbedLiteAppProcessChild::InitXPCOM()
observerService->NotifyObservers(nullptr, "embedliteInitialized", nullptr);
}

unused << SendInitialized();
Unused << SendInitialized();

InfallibleTArray<mozilla::dom::PrefSetting> prefs;
Preferences::GetPreferences(&prefs);
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/embedshared/EmbedLiteAppBaseChild.cpp
Expand Up @@ -66,7 +66,7 @@ EmbedLiteAppBaseChild::Observe(nsISupports* aSubject,
const char16_t* aData)
{
LOGF("topic:%s", aTopic);
unused << SendObserve(nsDependentCString(aTopic), aData ? nsDependentString(aData) : nsString());
Unused << SendObserve(nsDependentCString(aTopic), aData ? nsDependentString(aData) : nsString());
return NS_OK;
}

Expand Down
6 changes: 3 additions & 3 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseChild.cpp
Expand Up @@ -146,7 +146,7 @@ bool EmbedLiteViewBaseChild::RecvDestroy()
mChrome = nullptr;
mDOMWindow = nullptr;
mWebNavigation = nullptr;
unused << SendDestroyed();
Unused << SendDestroyed();
PEmbedLiteViewChild::Send__delete__(this);
return true;
}
Expand Down Expand Up @@ -286,7 +286,7 @@ EmbedLiteViewBaseChild::InitGeckoWindow(const uint32_t& parentId, const bool& is

OnGeckoWindowInitialized();

unused << SendInitialized();
Unused << SendInitialized();
}

nsresult
Expand Down Expand Up @@ -1143,7 +1143,7 @@ EmbedLiteViewBaseChild::OnFirstPaint(int32_t aX, int32_t aY)
nsIPresShell* presShell = doc->GetShell();
if (presShell) {
nscolor bgcolor = presShell->GetCanvasBackground();
unused << SendSetBackgroundColor(bgcolor);
Unused << SendSetBackgroundColor(bgcolor);
}

return SendOnFirstPaint(aX, aY) ? NS_OK : NS_ERROR_FAILURE;
Expand Down
16 changes: 8 additions & 8 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp
Expand Up @@ -390,9 +390,9 @@ EmbedLiteViewBaseParent::ReceiveInputEvent(const mozilla::InputData& aEvent)
if (aEvent.mInputType == MULTITOUCH_INPUT) {
const MultiTouchInput& multiTouchInput = aEvent.AsMultiTouchInput();
if (multiTouchInput.mType == MultiTouchInput::MULTITOUCH_MOVE) {
unused << SendInputDataTouchMoveEvent(guid, multiTouchInput, outInputBlockId);
Unused << SendInputDataTouchMoveEvent(guid, multiTouchInput, outInputBlockId);
} else {
unused << SendInputDataTouchEvent(guid, multiTouchInput, outInputBlockId);
Unused << SendInputDataTouchEvent(guid, multiTouchInput, outInputBlockId);
}
}
}
Expand All @@ -405,7 +405,7 @@ EmbedLiteViewBaseParent::TextEvent(const char* composite, const char* preEdit)
{
LOGT("commit:%s, pre:%s, mLastIMEState:%i", composite, preEdit, mLastIMEState);
if (mLastIMEState) {
unused << SendHandleTextEvent(NS_ConvertUTF8toUTF16(nsDependentCString(composite)),
Unused << SendHandleTextEvent(NS_ConvertUTF8toUTF16(nsDependentCString(composite)),
NS_ConvertUTF8toUTF16(nsDependentCString(preEdit)));
} else {
NS_ERROR("Text event must not be sent while IME disabled");
Expand All @@ -430,7 +430,7 @@ NS_IMETHODIMP
EmbedLiteViewBaseParent::SendKeyPress(int domKeyCode, int gmodifiers, int charCode)
{
LOGT("dom:%i, mod:%i, char:'%c'", domKeyCode, gmodifiers, charCode);
unused << SendHandleKeyPressEvent(domKeyCode, gmodifiers, charCode);
Unused << SendHandleKeyPressEvent(domKeyCode, gmodifiers, charCode);

return NS_OK;
}
Expand All @@ -439,7 +439,7 @@ NS_IMETHODIMP
EmbedLiteViewBaseParent::SendKeyRelease(int domKeyCode, int gmodifiers, int charCode)
{
LOGT("dom:%i, mod:%i, char:'%c'", domKeyCode, gmodifiers, charCode);
unused << SendHandleKeyReleaseEvent(domKeyCode, gmodifiers, charCode);
Unused << SendHandleKeyReleaseEvent(domKeyCode, gmodifiers, charCode);

return NS_OK;
}
Expand All @@ -455,7 +455,7 @@ EmbedLiteViewBaseParent::MousePress(int x, int y, int mstime, unsigned int butto
180.0f,
1.0f));
mController->ReceiveInputEvent(event, nullptr, nullptr);
unused << SendMouseEvent(NS_LITERAL_STRING("mousedown"),
Unused << SendMouseEvent(NS_LITERAL_STRING("mousedown"),
x, y, buttons, 1, modifiers,
true);
return NS_OK;
Expand All @@ -472,7 +472,7 @@ EmbedLiteViewBaseParent::MouseRelease(int x, int y, int mstime, unsigned int but
180.0f,
1.0f));
mController->ReceiveInputEvent(event, nullptr, nullptr);
unused << SendMouseEvent(NS_LITERAL_STRING("mouseup"),
Unused << SendMouseEvent(NS_LITERAL_STRING("mouseup"),
x, y, buttons, 1, modifiers,
true);

Expand All @@ -490,7 +490,7 @@ EmbedLiteViewBaseParent::MouseMove(int x, int y, int mstime, unsigned int button
180.0f,
1.0f));
mController->ReceiveInputEvent(event, nullptr, nullptr);
unused << SendMouseEvent(NS_LITERAL_STRING("mousemove"),
Unused << SendMouseEvent(NS_LITERAL_STRING("mousemove"),
x, y, buttons, 1, modifiers,
true);

Expand Down

0 comments on commit 42c8b4c

Please sign in to comment.