blob: 04c187854c685999b5e1e03054006f549cf6abda [file] [log] [blame]
// Copyright 2020 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_UI_FULLSCREEN_FULLSCREEN_BROWSER_OBSERVER_H_
#define IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_BROWSER_OBSERVER_H_
#include "base/scoped_observer.h"
#import "ios/chrome/browser/main/browser.h"
#import "ios/chrome/browser/main/browser_observer.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.h"
// A BrowserObserver that observes the BrowserDestroyed callback.
class FullscreenBrowserObserver : public BrowserObserver {
public:
FullscreenBrowserObserver(
FullscreenWebStateListObserver* web_state_list_observer,
Browser* browser);
~FullscreenBrowserObserver() override;
private:
// BrowserObserver
void BrowserDestroyed(Browser* browser) override;
// The FullscreenWebStateListObserver passed on construction.
FullscreenWebStateListObserver* web_state_list_observer_;
// Scoped observer that facilitates observing an BrowserObserver.
ScopedObserver<Browser, BrowserObserver> scoped_observer_;
};
#endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_BROWSER_OBSERVER_H_