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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 } | 1045 } |
1046 | 1046 |
1047 if (delegate_) | 1047 if (delegate_) |
1048 delegate_->NavigationStateChanged(this, changed_flags); | 1048 delegate_->NavigationStateChanged(this, changed_flags); |
1049 } | 1049 } |
1050 | 1050 |
1051 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { | 1051 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { |
1052 return last_active_time_; | 1052 return last_active_time_; |
1053 } | 1053 } |
1054 | 1054 |
| 1055 void WebContentsImpl::SetLastActiveTime(base::TimeTicks last_active_time) { |
| 1056 last_active_time_ = last_active_time; |
| 1057 } |
| 1058 |
1055 void WebContentsImpl::WasShown() { | 1059 void WebContentsImpl::WasShown() { |
1056 controller_.SetActive(true); | 1060 controller_.SetActive(true); |
1057 | 1061 |
1058 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) { | 1062 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) { |
1059 if (view) { | 1063 if (view) { |
1060 view->Show(); | 1064 view->Show(); |
1061 #if defined(OS_MACOSX) | 1065 #if defined(OS_MACOSX) |
1062 view->SetActive(true); | 1066 view->SetActive(true); |
1063 #endif | 1067 #endif |
1064 } | 1068 } |
(...skipping 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4389 player_map->erase(it); | 4393 player_map->erase(it); |
4390 } | 4394 } |
4391 | 4395 |
4392 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4396 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4393 force_disable_overscroll_content_ = force_disable; | 4397 force_disable_overscroll_content_ = force_disable; |
4394 if (view_) | 4398 if (view_) |
4395 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4399 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4396 } | 4400 } |
4397 | 4401 |
4398 } // namespace content | 4402 } // namespace content |
OLD | NEW |