| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/scheduler/renderer/renderer_web_scheduler_impl.h" | 5 #include "components/scheduler/renderer/renderer_web_scheduler_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 std::unique_ptr<blink::WebViewScheduler> | 37 std::unique_ptr<blink::WebViewScheduler> |
| 38 RendererWebSchedulerImpl::createWebViewScheduler(blink::WebView* web_view) { | 38 RendererWebSchedulerImpl::createWebViewScheduler(blink::WebView* web_view) { |
| 39 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 39 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 40 return base::WrapUnique(new WebViewSchedulerImpl( | 40 return base::WrapUnique(new WebViewSchedulerImpl( |
| 41 web_view, renderer_scheduler_, | 41 web_view, renderer_scheduler_, |
| 42 command_line->HasSwitch(switches::kDisableBackgroundTimerThrottling))); | 42 command_line->HasSwitch(switches::kDisableBackgroundTimerThrottling))); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void RendererWebSchedulerImpl::addPendingNavigation() { | |
| 46 renderer_scheduler_->AddPendingNavigation(); | |
| 47 } | |
| 48 | |
| 49 void RendererWebSchedulerImpl::removePendingNavigation() { | |
| 50 renderer_scheduler_->RemovePendingNavigation(); | |
| 51 } | |
| 52 | |
| 53 void RendererWebSchedulerImpl::onNavigationStarted() { | 45 void RendererWebSchedulerImpl::onNavigationStarted() { |
| 54 renderer_scheduler_->OnNavigationStarted(); | 46 renderer_scheduler_->OnNavigationStarted(); |
| 55 } | 47 } |
| 56 | 48 |
| 57 } // namespace scheduler | 49 } // namespace scheduler |
| OLD | NEW |