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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2931023002: [TooManyTabs] Add TabNavigationThrottle (Closed)
Patch Set: add comments Created 3 years, 5 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 } 1500 }
1501 1501
1502 last_hidden_time_ = base::TimeTicks::Now(); 1502 last_hidden_time_ = base::TimeTicks::Now();
1503 1503
1504 for (auto& observer : observers_) 1504 for (auto& observer : observers_)
1505 observer.WasHidden(); 1505 observer.WasHidden();
1506 1506
1507 should_normally_be_visible_ = false; 1507 should_normally_be_visible_ = false;
1508 } 1508 }
1509 1509
1510 bool WebContentsImpl::IsVisible() const {
1511 return should_normally_be_visible_;
1512 }
1513
1510 void WebContentsImpl::WasOccluded() { 1514 void WebContentsImpl::WasOccluded() {
1511 if (capturer_count_ > 0) 1515 if (capturer_count_ > 0)
1512 return; 1516 return;
1513 1517
1514 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) 1518 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree())
1515 view->WasOccluded(); 1519 view->WasOccluded();
1516 } 1520 }
1517 1521
1518 void WebContentsImpl::WasUnOccluded() { 1522 void WebContentsImpl::WasUnOccluded() {
1519 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) 1523 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree())
(...skipping 4285 matching lines...) Expand 10 before | Expand all | Expand 10 after
5805 } 5809 }
5806 5810
5807 void WebContentsImpl::MediaMutedStatusChanged( 5811 void WebContentsImpl::MediaMutedStatusChanged(
5808 const WebContentsObserver::MediaPlayerId& id, 5812 const WebContentsObserver::MediaPlayerId& id,
5809 bool muted) { 5813 bool muted) {
5810 for (auto& observer : observers_) 5814 for (auto& observer : observers_)
5811 observer.MediaMutedStatusChanged(id, muted); 5815 observer.MediaMutedStatusChanged(id, muted);
5812 } 5816 }
5813 5817
5814 } // namespace content 5818 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698