mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
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:
parent
bd8834c19e
commit
bdf50726af
@ -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();
|
||||
}
|
@ -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
|
@ -31,7 +31,6 @@ UNIFIED_SOURCES += [
|
||||
'inDeepTreeWalker.cpp',
|
||||
'inDOMUtils.cpp',
|
||||
'inLayoutUtils.cpp',
|
||||
'inSearchLoop.cpp',
|
||||
'nsFontFace.cpp',
|
||||
'nsFontFaceList.cpp',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user