blob: 9ba1ccd7bf0f090b2f53aa892abf8731f5f9e09b [file] [log] [blame]
// Copyright 2021 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.
#ifndef IOS_CHROME_BROWSER_OPTIMIZATION_GUIDE_TAB_URL_PROVIDER_IMPL_H_
#define IOS_CHROME_BROWSER_OPTIMIZATION_GUIDE_TAB_URL_PROVIDER_IMPL_H_
#include <vector>
#include "components/optimization_guide/core/tab_url_provider.h"
namespace base {
class Clock;
class TimeDelta;
} // namespace base
class BrowserList;
class ChromeBrowserState;
class GURL;
// optimization_guide::TabUrlProvider implementation for iOS.
class TabUrlProviderImpl : public optimization_guide::TabUrlProvider {
public:
TabUrlProviderImpl(ChromeBrowserState* browser_state, base::Clock* clock);
~TabUrlProviderImpl() override;
private:
// optimization_guide::TabUrlProvider implementation.
const std::vector<GURL> GetUrlsOfActiveTabs(
const base::TimeDelta& duration_since_last_shown) override;
// Used to get the URLs in all active tabs. Must out live this class.
BrowserList* browser_list_;
base::Clock* clock_;
};
#endif // IOS_CHROME_BROWSER_OPTIMIZATION_GUIDE_TAB_URL_PROVIDER_IMPL_H_