Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2292)

Unified Diff: content/public/browser/web_contents.h

Issue 2931023002: [TooManyTabs] Add TabNavigationThrottle (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/web_contents.h
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 3e1ed690eb54a397b4dc557f18de0e0b39156b15..964600618beaa7d439609cf47649d857997620db 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -441,6 +441,9 @@ class WebContents : public PageNavigator,
virtual void WasShown() = 0;
virtual void WasHidden() = 0;
+ // Whether the WebContents is visible.
+ virtual bool IsVisible() const = 0;
Charlie Reis 2017/06/10 00:53:37 I think there's probably a better way to check thi
kenrb 2017/06/12 15:26:22 The call site should be able to use: navigation_ha
nasko 2017/06/12 23:22:02 Doesn't that distribute implementation logic outsi
Zhen Wang 2017/06/13 23:33:21 This is one option for us to know if a tab is visi
nasko 2017/06/15 20:01:58 I defer to kenrb@ on this one.
kenrb 2017/06/15 20:53:08 Adding that method might make sense here. The only
Zhen Wang 2017/06/19 23:00:12 Right. We will need to know if it is visible befor
+
// Returns true if the before unload and unload listeners need to be
// fired. The value of this changes over time. For example, if true and the
// before unload listener is executed and allows the user to exit, then this
« chrome/common/chrome_switches.cc ('K') | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698