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

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

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 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_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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 } 1498 }
1499 1499
1500 last_hidden_time_ = base::TimeTicks::Now(); 1500 last_hidden_time_ = base::TimeTicks::Now();
1501 1501
1502 for (auto& observer : observers_) 1502 for (auto& observer : observers_)
1503 observer.WasHidden(); 1503 observer.WasHidden();
1504 1504
1505 should_normally_be_visible_ = false; 1505 should_normally_be_visible_ = false;
1506 } 1506 }
1507 1507
1508 bool WebContentsImpl::IsVisible() const {
1509 return should_normally_be_visible_;
1510 }
1511
1508 void WebContentsImpl::WasOccluded() { 1512 void WebContentsImpl::WasOccluded() {
1509 if (capturer_count_ > 0) 1513 if (capturer_count_ > 0)
1510 return; 1514 return;
1511 1515
1512 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) 1516 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree())
1513 view->WasOccluded(); 1517 view->WasOccluded();
1514 } 1518 }
1515 1519
1516 void WebContentsImpl::WasUnOccluded() { 1520 void WebContentsImpl::WasUnOccluded() {
1517 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) 1521 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree())
(...skipping 4202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5720 new_root->SetOriginalOpener(opener->frame_tree()->root()); 5724 new_root->SetOriginalOpener(opener->frame_tree()->root());
5721 5725
5722 if (!opener_suppressed) { 5726 if (!opener_suppressed) {
5723 new_root->SetOpener(opener); 5727 new_root->SetOpener(opener);
5724 created_with_opener_ = true; 5728 created_with_opener_ = true;
5725 } 5729 }
5726 } 5730 }
5727 } 5731 }
5728 5732
5729 } // namespace content 5733 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698