Bug 1342880 : Remove class inSearchLoop from the tree. r=heycam

inSearchLoop is referenced from nowhere, as a result, we don't need to get its timer event labeled.

MozReview-Commit-ID: 5fxg38WD9dQ

--HG--
extra : rebase_source : a72f150e15605e604e969c725ed4a23168bda1b4
This commit is contained in:
Astley Chen 2017-03-15 11:48:41 +08:00
parent bd8834c19e
commit bdf50726af
3 changed files with 0 additions and 87 deletions

View File

@ -1,58 +0,0 @@
/* 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/. */
#include "inSearchLoop.h"
#include "nsITimer.h"
#include "nsIServiceManager.h"
///////////////////////////////////////////////////////////////////////////////
inSearchLoop::inSearchLoop(inISearchProcess* aSearchProcess)
{
mSearchProcess = aSearchProcess;
nsresult rv;
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
}
inSearchLoop::~inSearchLoop()
{
}
///////////////////////////////////////////////////////////////////////////////
// inSearchLoop
nsresult
inSearchLoop::Start()
{
mTimer->InitWithFuncCallback(inSearchLoop::TimerCallback, (void*)this, 0, nsITimer::TYPE_REPEATING_SLACK);
return NS_OK;
}
nsresult
inSearchLoop::Step()
{
bool done = false;
mSearchProcess->SearchStep(&done);
if (done)
Stop();
return NS_OK;
}
nsresult
inSearchLoop::Stop()
{
mTimer->Cancel();
return NS_OK;
}
void
inSearchLoop::TimerCallback(nsITimer *aTimer, void *aClosure)
{
inSearchLoop* loop = (inSearchLoop*) aClosure;
loop->Step();
}

View File

@ -1,28 +0,0 @@
/* 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 __inSearchLoop_h__
#define __inSearchLoop_h__
#include "nsCOMPtr.h"
#include "nsITimer.h"
#include "inISearchProcess.h"
class inSearchLoop
{
public:
explicit inSearchLoop(inISearchProcess* aSearchProcess);
virtual ~inSearchLoop();
nsresult Start();
nsresult Step();
nsresult Stop();
static void TimerCallback(nsITimer *aTimer, void *aClosure);
protected:
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<inISearchProcess> mSearchProcess;
};
#endif

View File

@ -31,7 +31,6 @@ UNIFIED_SOURCES += [
'inDeepTreeWalker.cpp',
'inDOMUtils.cpp',
'inLayoutUtils.cpp',
'inSearchLoop.cpp',
'nsFontFace.cpp',
'nsFontFaceList.cpp',
]