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_FRAME_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ |
6 #define COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 WebViewSchedulerImpl* parent_web_view_scheduler); | 29 WebViewSchedulerImpl* parent_web_view_scheduler); |
30 | 30 |
31 ~WebFrameSchedulerImpl() override; | 31 ~WebFrameSchedulerImpl() override; |
32 | 32 |
33 // blink::WebFrameScheduler implementation: | 33 // blink::WebFrameScheduler implementation: |
34 void setFrameVisible(bool visible) override; | 34 void setFrameVisible(bool visible) override; |
35 blink::WebTaskRunner* loadingTaskRunner() override; | 35 blink::WebTaskRunner* loadingTaskRunner() override; |
36 blink::WebTaskRunner* timerTaskRunner() override; | 36 blink::WebTaskRunner* timerTaskRunner() override; |
37 void setFrameOrigin(const blink::WebSecurityOrigin* origin) override; | 37 void setFrameOrigin(const blink::WebSecurityOrigin* origin) override; |
38 | 38 |
| 39 void SetPageInBackground(bool page_in_background); |
| 40 |
39 private: | 41 private: |
40 friend class WebViewSchedulerImpl; | 42 friend class WebViewSchedulerImpl; |
41 | 43 |
42 void DetachFromWebViewScheduler(); | 44 void DetachFromWebViewScheduler(); |
| 45 void ApplyPolicyToTimerQueue(); |
43 | 46 |
44 scoped_refptr<TaskQueue> loading_task_queue_; | 47 scoped_refptr<TaskQueue> loading_task_queue_; |
45 scoped_refptr<TaskQueue> timer_task_queue_; | 48 scoped_refptr<TaskQueue> timer_task_queue_; |
46 scoped_ptr<WebTaskRunnerImpl> loading_web_task_runner_; | 49 scoped_ptr<WebTaskRunnerImpl> loading_web_task_runner_; |
47 scoped_ptr<WebTaskRunnerImpl> timer_web_task_runner_; | 50 scoped_ptr<WebTaskRunnerImpl> timer_web_task_runner_; |
48 RendererSchedulerImpl* renderer_scheduler_; // NOT OWNED | 51 RendererSchedulerImpl* renderer_scheduler_; // NOT OWNED |
49 WebViewSchedulerImpl* parent_web_view_scheduler_; // NOT OWNED | 52 WebViewSchedulerImpl* parent_web_view_scheduler_; // NOT OWNED |
50 blink::WebSecurityOrigin origin_; | 53 blink::WebSecurityOrigin origin_; |
51 bool visible_; | 54 bool visible_; |
| 55 bool page_in_background_; |
52 | 56 |
53 DISALLOW_COPY_AND_ASSIGN(WebFrameSchedulerImpl); | 57 DISALLOW_COPY_AND_ASSIGN(WebFrameSchedulerImpl); |
54 }; | 58 }; |
55 | 59 |
56 } // namespace scheduler | 60 } // namespace scheduler |
57 | 61 |
58 #endif // COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ | 62 #endif // COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ |
OLD | NEW |