tab_observer.h 889 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef WEBLAYER_PUBLIC_TAB_OBSERVER_H_
  5. #define WEBLAYER_PUBLIC_TAB_OBSERVER_H_
  6. #include <string>
  7. class GURL;
  8. namespace weblayer {
  9. class TabObserver {
  10. public:
  11. // The URL bar should be updated to |url|.
  12. virtual void DisplayedUrlChanged(const GURL& url) {}
  13. // Triggered when the render process dies, either due to crash or killed by
  14. // the system to reclaim memory.
  15. virtual void OnRenderProcessGone() {}
  16. // Called when the title of this tab changes. Note before the page sets a
  17. // title, the title may be a portion of the Uri.
  18. virtual void OnTitleUpdated(const std::u16string& title) {}
  19. protected:
  20. virtual ~TabObserver() {}
  21. };
  22. } // namespace weblayer
  23. #endif // WEBLAYER_PUBLIC_TAB_OBSERVER_H_