| 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 #ifndef COMPONENTS_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER_IMPL_H_ |
| 6 #define COMPONENTS_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } // namespace blink | 21 } // namespace blink |
| 22 | 22 |
| 23 namespace scheduler { | 23 namespace scheduler { |
| 24 | 24 |
| 25 class RendererSchedulerImpl; | 25 class RendererSchedulerImpl; |
| 26 class WebFrameSchedulerImpl; | 26 class WebFrameSchedulerImpl; |
| 27 | 27 |
| 28 class SCHEDULER_EXPORT WebViewSchedulerImpl : public blink::WebViewScheduler { | 28 class SCHEDULER_EXPORT WebViewSchedulerImpl : public blink::WebViewScheduler { |
| 29 public: | 29 public: |
| 30 WebViewSchedulerImpl(blink::WebView* web_view, | 30 WebViewSchedulerImpl(blink::WebView* web_view, |
| 31 RendererSchedulerImpl* renderer_scheduler); | 31 RendererSchedulerImpl* renderer_scheduler, |
| 32 bool disable_background_timer_throttling); |
| 32 | 33 |
| 33 ~WebViewSchedulerImpl() override; | 34 ~WebViewSchedulerImpl() override; |
| 34 | 35 |
| 35 // blink::WebViewScheduler implementation: | 36 // blink::WebViewScheduler implementation: |
| 36 void setPageInBackground(bool page_in_background) override; | 37 void setPageInBackground(bool page_in_background) override; |
| 37 blink::WebPassOwnPtr<blink::WebFrameScheduler> createFrameScheduler() | 38 blink::WebPassOwnPtr<blink::WebFrameScheduler> createFrameScheduler() |
| 38 override; | 39 override; |
| 39 | 40 |
| 40 blink::WebView* web_view() const { return web_view_; } | 41 blink::WebView* web_view() const { return web_view_; } |
| 41 | 42 |
| 42 scoped_ptr<WebFrameSchedulerImpl> createWebFrameSchedulerImpl(); | 43 scoped_ptr<WebFrameSchedulerImpl> createWebFrameSchedulerImpl(); |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 friend class WebFrameSchedulerImpl; | 46 friend class WebFrameSchedulerImpl; |
| 46 | 47 |
| 47 void Unregister(WebFrameSchedulerImpl* frame_scheduler); | 48 void Unregister(WebFrameSchedulerImpl* frame_scheduler); |
| 48 | 49 |
| 49 std::set<WebFrameSchedulerImpl*> frame_schedulers_; | 50 std::set<WebFrameSchedulerImpl*> frame_schedulers_; |
| 50 blink::WebView* web_view_; | 51 blink::WebView* web_view_; |
| 51 RendererSchedulerImpl* renderer_scheduler_; | 52 RendererSchedulerImpl* renderer_scheduler_; |
| 52 bool page_in_background_; | 53 bool page_in_background_; |
| 54 bool disable_background_timer_throttling_; |
| 53 | 55 |
| 54 DISALLOW_COPY_AND_ASSIGN(WebViewSchedulerImpl); | 56 DISALLOW_COPY_AND_ASSIGN(WebViewSchedulerImpl); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace scheduler | 59 } // namespace scheduler |
| 58 | 60 |
| 59 #endif // COMPONENTS_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER_IMPL_H_ | 61 #endif // COMPONENTS_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER_IMPL_H_ |
| OLD | NEW |