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

Unified Diff: content/public/browser/push_messaging_service.cc

Issue 866443003: Push API: Don't require notification if tab is visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ycm_outdir
Patch Set: Address Michael's review comments Created 5 years, 11 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/push_messaging_service.cc
diff --git a/content/public/browser/push_messaging_service.cc b/content/public/browser/push_messaging_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b46a686bc777753f59ee0bddbb9fa198f8c58513
--- /dev/null
+++ b/content/public/browser/push_messaging_service.cc
@@ -0,0 +1,19 @@
+// Copyright 2015 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.
+
+#include "content/public/browser/push_messaging_service.h"
+
+#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/public/browser/web_contents.h"
+
+namespace content {
+
+bool PushMessagingService::IsWebContentsUserVisible(
+ const WebContents* web_contents) {
+ const WebContentsImpl* web_contents_impl =
+ static_cast<const WebContentsImpl*>(web_contents);
+ return web_contents_impl->should_normally_be_visible();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698