blob: 638ee72a8b86aab0fe11867ecd6fcb568c0dd840 [file] [log] [blame]
// Copyright 2017 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.
#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_external.h"
#include "base/logging.h"
#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h"
#include "chrome/browser/resource_coordinator/utils.h"
namespace resource_coordinator {
// static
TabLifecycleUnitExternal* TabLifecycleUnitExternal::FromWebContents(
content::WebContents* web_contents) {
return GetTabLifecycleUnitSource()->GetTabLifecycleUnitExternal(web_contents);
}
// static
void TabLifecycleUnitExternal::AddTabLifecycleObserver(
TabLifecycleObserver* observer) {
GetTabLifecycleUnitSource()->AddTabLifecycleObserver(observer);
}
// static
void TabLifecycleUnitExternal::RemoveTabLifecycleObserver(
TabLifecycleObserver* observer) {
GetTabLifecycleUnitSource()->RemoveTabLifecycleObserver(observer);
}
} // namespace resource_coordinator