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

Side by Side Diff: content/browser/web_contents/web_contents_impl.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: Switch statement for GetVisibilityState Created 5 years, 10 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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 } 1018 }
1019 1019
1020 if (delegate_) 1020 if (delegate_)
1021 delegate_->NavigationStateChanged(this, changed_flags); 1021 delegate_->NavigationStateChanged(this, changed_flags);
1022 } 1022 }
1023 1023
1024 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { 1024 base::TimeTicks WebContentsImpl::GetLastActiveTime() const {
1025 return last_active_time_; 1025 return last_active_time_;
1026 } 1026 }
1027 1027
1028
mlamouri (slow - plz ping) 2015/02/02 12:36:58 ditto
johnme 2015/02/02 15:58:36 Done.
1028 void WebContentsImpl::WasShown() { 1029 void WebContentsImpl::WasShown() {
1029 controller_.SetActive(true); 1030 controller_.SetActive(true);
1030 1031
1031 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) { 1032 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) {
1032 if (view) { 1033 if (view) {
1033 view->Show(); 1034 view->Show();
1034 #if defined(OS_MACOSX) 1035 #if defined(OS_MACOSX)
1035 view->SetActive(true); 1036 view->SetActive(true);
1036 #endif 1037 #endif
1037 } 1038 }
(...skipping 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after
4453 node->render_manager()->ResumeResponseDeferredAtStart(); 4454 node->render_manager()->ResumeResponseDeferredAtStart();
4454 } 4455 }
4455 4456
4456 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4457 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4457 force_disable_overscroll_content_ = force_disable; 4458 force_disable_overscroll_content_ = force_disable;
4458 if (view_) 4459 if (view_)
4459 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4460 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4460 } 4461 }
4461 4462
4462 } // namespace content 4463 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698