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/web_view_scheduler_impl.h" | 5 #include "components/scheduler/renderer/web_view_scheduler_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/scheduler/base/virtual_time_domain.h" | 8 #include "components/scheduler/base/virtual_time_domain.h" |
9 #include "components/scheduler/child/scheduler_tqm_delegate.h" | 9 #include "components/scheduler/child/scheduler_tqm_delegate.h" |
10 #include "components/scheduler/renderer/renderer_scheduler_impl.h" | 10 #include "components/scheduler/renderer/renderer_scheduler_impl.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 frame_scheduler->SetPageInBackground(page_in_background_); | 42 frame_scheduler->SetPageInBackground(page_in_background_); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 scoped_ptr<WebFrameSchedulerImpl> | 46 scoped_ptr<WebFrameSchedulerImpl> |
47 WebViewSchedulerImpl::createWebFrameSchedulerImpl() { | 47 WebViewSchedulerImpl::createWebFrameSchedulerImpl() { |
48 scoped_ptr<WebFrameSchedulerImpl> frame_scheduler( | 48 scoped_ptr<WebFrameSchedulerImpl> frame_scheduler( |
49 new WebFrameSchedulerImpl(renderer_scheduler_, this)); | 49 new WebFrameSchedulerImpl(renderer_scheduler_, this)); |
50 frame_scheduler->SetPageInBackground(page_in_background_); | 50 frame_scheduler->SetPageInBackground(page_in_background_); |
51 frame_schedulers_.insert(frame_scheduler.get()); | 51 frame_schedulers_.insert(frame_scheduler.get()); |
52 return frame_scheduler.Pass(); | 52 return frame_scheduler; |
53 } | 53 } |
54 | 54 |
55 blink::WebPassOwnPtr<blink::WebFrameScheduler> | 55 blink::WebPassOwnPtr<blink::WebFrameScheduler> |
56 WebViewSchedulerImpl::createFrameScheduler() { | 56 WebViewSchedulerImpl::createFrameScheduler() { |
57 return blink::adoptWebPtr(createWebFrameSchedulerImpl().release()); | 57 return blink::adoptWebPtr(createWebFrameSchedulerImpl().release()); |
58 } | 58 } |
59 | 59 |
60 void WebViewSchedulerImpl::Unregister(WebFrameSchedulerImpl* frame_scheduler) { | 60 void WebViewSchedulerImpl::Unregister(WebFrameSchedulerImpl* frame_scheduler) { |
61 DCHECK(frame_schedulers_.find(frame_scheduler) != frame_schedulers_.end()); | 61 DCHECK(frame_schedulers_.find(frame_scheduler) != frame_schedulers_.end()); |
62 frame_schedulers_.erase(frame_scheduler); | 62 frame_schedulers_.erase(frame_scheduler); |
63 } | 63 } |
64 | 64 |
65 } // namespace scheduler | 65 } // namespace scheduler |
OLD | NEW |