chromium/chrome/browser/sessions/tab_loader_delegate.cc

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

#include "chrome/browser/sessions/tab_loader_delegate.h"

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/resource_coordinator/session_restore_policy.h"
#include "chrome/browser/resource_coordinator/tab_manager_features.h"
#include "chrome/browser/sessions/session_restore_observer.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/network_service_instance.h"
#include "services/network/public/cpp/network_connection_tracker.h"

namespace {

// The timeout time after which the next tab gets loaded if the previous tab did
// not finish loading yet. The used value is half of the median value of all
// ChromeOS devices loading the 25 most common web pages. Half is chosen since
// the loading time is a mix of server response and data bandwidth.
static const int kInitialDelayTimerMS =;

// Similar to the above constant, but the timeout that is afforded to the
// visible tab only. Having this be a longer value ensures the visible time has
// more time during which it is the only one loading, decreasing the time to
// first paint and interactivity of the foreground tab.
static const int kFirstTabLoadTimeoutMS =;

resource_coordinator::SessionRestorePolicy* g_testing_policy =;

class TabLoaderDelegateImpl
    : public TabLoaderDelegate,
      public network::NetworkConnectionTracker::NetworkConnectionObserver {};

TabLoaderDelegateImpl::TabLoaderDelegateImpl(TabLoaderCallback* callback)
    :{}

TabLoaderDelegateImpl::~TabLoaderDelegateImpl() {}

void TabLoaderDelegateImpl::OnConnectionChanged(
    network::mojom::ConnectionType type) {}

void TabLoaderDelegateImpl::NotifyTabScoreChanged(content::WebContents* content,
                                                  float score) {}

}  // namespace

// static
std::unique_ptr<TabLoaderDelegate> TabLoaderDelegate::Create(
    TabLoaderCallback* callback) {}

// static
void TabLoaderDelegate::SetSessionRestorePolicyForTesting(
    resource_coordinator::SessionRestorePolicy* policy) {}