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 | |
41 private: | 39 private: |
42 friend class WebViewSchedulerImpl; | 40 friend class WebViewSchedulerImpl; |
43 | 41 |
44 void DetachFromWebViewScheduler(); | 42 void DetachFromWebViewScheduler(); |
45 void ApplyPolicyToTimerQueue(); | |
46 | 43 |
47 scoped_refptr<TaskQueue> loading_task_queue_; | 44 scoped_refptr<TaskQueue> loading_task_queue_; |
48 scoped_refptr<TaskQueue> timer_task_queue_; | 45 scoped_refptr<TaskQueue> timer_task_queue_; |
49 scoped_ptr<WebTaskRunnerImpl> loading_web_task_runner_; | 46 scoped_ptr<WebTaskRunnerImpl> loading_web_task_runner_; |
50 scoped_ptr<WebTaskRunnerImpl> timer_web_task_runner_; | 47 scoped_ptr<WebTaskRunnerImpl> timer_web_task_runner_; |
51 RendererSchedulerImpl* renderer_scheduler_; // NOT OWNED | 48 RendererSchedulerImpl* renderer_scheduler_; // NOT OWNED |
52 WebViewSchedulerImpl* parent_web_view_scheduler_; // NOT OWNED | 49 WebViewSchedulerImpl* parent_web_view_scheduler_; // NOT OWNED |
53 blink::WebSecurityOrigin origin_; | 50 blink::WebSecurityOrigin origin_; |
54 bool visible_; | 51 bool visible_; |
55 bool page_in_background_; | |
56 | 52 |
57 DISALLOW_COPY_AND_ASSIGN(WebFrameSchedulerImpl); | 53 DISALLOW_COPY_AND_ASSIGN(WebFrameSchedulerImpl); |
58 }; | 54 }; |
59 | 55 |
60 } // namespace scheduler | 56 } // namespace scheduler |
61 | 57 |
62 #endif // COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ | 58 #endif // COMPONENTS_SCHEDULER_RENDERER_WEB_FRAME_SCHEDULER_IMPL_H_ |
OLD | NEW |