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

Unified Diff: chrome/browser/ui/browser.cc

Issue 7036019: Enabling page visibility api in the chrome browser. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 9d779273048e3fb6ab6db8f2b9609ef930bd6c98..fbb6f76fea6db86797038dd1f8d06fa165954dfa 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3364,6 +3364,14 @@ void Browser::WorkerCrashed() {
l10n_util::GetStringUTF16(IDS_WEBWORKER_CRASHED_PROMPT), true));
}
+bool Browser::IsHidden(const TabContents* source) const {
+ TabContentsWrapper* wrapper = GetSelectedTabContentsWrapper();
+ if (wrapper)
+ return wrapper->tab_contents() != source;
+ // If we cant find the tab contents, assume we are not visible.
+ return true;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Browser, TabContentsWrapperDelegate implementation:

Powered by Google App Engine
This is Rietveld 408576698