blob: a92217bd6ab1800e56d9c3c9fc1c2b802a8297ef [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
namespace web {
class WebState;
namespace reading_list {
// Dispatcher for WebState having a Favicon Driver, with BookmarkModel and
// HistoryService attached, as observer. After a WebState is returned, the
// dispatcher keeps it alive long enough for it to download the favicons.
class FaviconWebStateDispatcher {
FaviconWebStateDispatcher() {}
virtual ~FaviconWebStateDispatcher() {}
// Returns a WebState with a Favicon Driver attached.
virtual std::unique_ptr<web::WebState> RequestWebState() = 0;
// Called to return a WebState. The WebState should not be used after being
// returned.
virtual void ReturnWebState(std::unique_ptr<web::WebState> web_state) = 0;
// Releases all the WebState currently retained for favicon fetching.
virtual void ReleaseAll() = 0;
} // namespace reading_list