| OLD | NEW |
| 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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 } | 990 } |
| 991 | 991 |
| 992 bool WebContentsImpl::IsBeingDestroyed() const { | 992 bool WebContentsImpl::IsBeingDestroyed() const { |
| 993 return is_being_destroyed_; | 993 return is_being_destroyed_; |
| 994 } | 994 } |
| 995 | 995 |
| 996 void WebContentsImpl::NotifyNavigationStateChanged( | 996 void WebContentsImpl::NotifyNavigationStateChanged( |
| 997 InvalidateTypes changed_flags) { | 997 InvalidateTypes changed_flags) { |
| 998 // Create and release the audio power save blocker depending on whether the | 998 // Create and release the audio power save blocker depending on whether the |
| 999 // tab is actively producing audio or not. | 999 // tab is actively producing audio or not. |
| 1000 if (changed_flags == INVALIDATE_TYPE_TAB && | 1000 if ((changed_flags & INVALIDATE_TYPE_TAB) && |
| 1001 AudioStreamMonitor::monitoring_available()) { | 1001 AudioStreamMonitor::monitoring_available()) { |
| 1002 if (WasRecentlyAudible()) { | 1002 if (WasRecentlyAudible()) { |
| 1003 if (!audio_power_save_blocker_) | 1003 if (!audio_power_save_blocker_) |
| 1004 CreateAudioPowerSaveBlocker(); | 1004 CreateAudioPowerSaveBlocker(); |
| 1005 } else { | 1005 } else { |
| 1006 audio_power_save_blocker_.reset(); | 1006 audio_power_save_blocker_.reset(); |
| 1007 } | 1007 } |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 if (delegate_) | 1010 if (delegate_) |
| (...skipping 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4381 node->render_manager()->ResumeResponseDeferredAtStart(); | 4381 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4382 } | 4382 } |
| 4383 | 4383 |
| 4384 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4384 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4385 force_disable_overscroll_content_ = force_disable; | 4385 force_disable_overscroll_content_ = force_disable; |
| 4386 if (view_) | 4386 if (view_) |
| 4387 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4387 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4388 } | 4388 } |
| 4389 | 4389 |
| 4390 } // namespace content | 4390 } // namespace content |
| OLD | NEW |