chromium/components/translate/content/browser/translate_waiter.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_TRANSLATE_WAITER_H_
#define COMPONENTS_TRANSLATE_CONTENT_BROWSER_TRANSLATE_WAITER_H_

#include <memory>

#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "components/translate/content/browser/content_translate_driver.h"
#include "components/translate/core/browser/translate_driver.h"
#include "components/translate/core/common/translate_errors.h"

namespace translate {

// A helper class that allows test to block until certain translate events have
// been received from a TranslateDriver.
class TranslateWaiter : TranslateDriver::LanguageDetectionObserver,
                        ContentTranslateDriver::TranslationObserver {};

}  // namespace translate

#endif  // COMPONENTS_TRANSLATE_CONTENT_BROWSER_TRANSLATE_WAITER_H_