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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.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: Expose WebContents::IsHiddenIgnoringCapturing instead of PushMessagingService::IsWebContentsUserVis… 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 // show garbage. 1624 // show garbage.
1625 // However - the page load mechanism requires an activation call through a 1625 // However - the page load mechanism requires an activation call through a
1626 // visibility call to (re)load. 1626 // visibility call to (re)load.
1627 if (visible) { 1627 if (visible) {
1628 is_or_was_visible_ = true; 1628 is_or_was_visible_ = true;
1629 web_contents_->WasShown(); 1629 web_contents_->WasShown();
1630 } 1630 }
1631 return; 1631 return;
1632 } 1632 }
1633 if (visible) { 1633 if (visible) {
1634 if (!web_contents_->should_normally_be_visible()) 1634 if (!web_contents_->IsHiddenIgnoringCapturing())
1635 web_contents_->WasShown(); 1635 web_contents_->WasShown();
1636 } else { 1636 } else {
1637 if (web_contents_->should_normally_be_visible()) 1637 if (web_contents_->IsHiddenIgnoringCapturing())
1638 web_contents_->WasHidden(); 1638 web_contents_->WasHidden();
1639 } 1639 }
1640 } 1640 }
1641 1641
1642 } // namespace content 1642 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698