forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
browser_observer.h
34 lines (24 loc) · 1001 Bytes
/
browser_observer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 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 WEBLAYER_PUBLIC_BROWSER_OBSERVER_H_
#define WEBLAYER_PUBLIC_BROWSER_OBSERVER_H_
#include "base/observer_list.h"
namespace weblayer {
class Tab;
class BrowserObserver : public base::CheckedObserver {
public:
// A Tab has been been added to the Browser.
virtual void OnTabAdded(Tab* tab) {}
// A Tab has been removed from the Browser. |active_tab_changed| indicates
// if the active tab changed as a result. If the active tab changed,
// OnActiveTabChanged() is also called.
virtual void OnTabRemoved(Tab* tab, bool active_tab_changed) {}
// The tab the user is interacting with has changed. |tab| may be null if no
// tabs are active.
virtual void OnActiveTabChanged(Tab* tab) {}
protected:
~BrowserObserver() override {}
};
} // namespace weblayer
#endif // WEBLAYER_PUBLIC_BROWSER_OBSERVER_H_