Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1240)

Side by Side Diff: components/scheduler/renderer/renderer_scheduler.h

Issue 1895773002: Move responsiblity of tab suspending from renderer to TabManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix time Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_SCHEDULER_H_ 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // driven by this process. A stricter condition than |OnRendererHidden()|, the 120 // driven by this process. A stricter condition than |OnRendererHidden()|, the
121 // process is assumed to be foregrounded when the scheduler is constructed. 121 // process is assumed to be foregrounded when the scheduler is constructed.
122 // Must be called on the main thread. 122 // Must be called on the main thread.
123 virtual void OnRendererBackgrounded() = 0; 123 virtual void OnRendererBackgrounded() = 0;
124 124
125 // Tells the scheduler that the renderer process has been foregrounded. 125 // Tells the scheduler that the renderer process has been foregrounded.
126 // This is the assumed state when the scheduler is constructed. 126 // This is the assumed state when the scheduler is constructed.
127 // Must be called on the main thread. 127 // Must be called on the main thread.
128 virtual void OnRendererForegrounded() = 0; 128 virtual void OnRendererForegrounded() = 0;
129 129
130 virtual void OnRendererSuspend() = 0;
131
130 // Tells the scheduler that a navigation task is pending. While any navigation 132 // Tells the scheduler that a navigation task is pending. While any navigation
131 // tasks are pending, the scheduler will ensure that loading tasks are not 133 // tasks are pending, the scheduler will ensure that loading tasks are not
132 // blocked even if they are expensive. Must be called on the main thread. 134 // blocked even if they are expensive. Must be called on the main thread.
133 virtual void AddPendingNavigation() = 0; 135 virtual void AddPendingNavigation() = 0;
134 136
135 // Tells the scheduler that a navigation task is no longer pending. 137 // Tells the scheduler that a navigation task is no longer pending.
136 // Must be called on the main thread. 138 // Must be called on the main thread.
137 virtual void RemovePendingNavigation() = 0; 139 virtual void RemovePendingNavigation() = 0;
138 140
139 // Tells the scheduler that a navigation has started. The scheduler will 141 // Tells the scheduler that a navigation has started. The scheduler will
(...skipping 25 matching lines...) Expand all
165 base::trace_event::BlameContext* blame_context) = 0; 167 base::trace_event::BlameContext* blame_context) = 0;
166 168
167 protected: 169 protected:
168 RendererScheduler(); 170 RendererScheduler();
169 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); 171 DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
170 }; 172 };
171 173
172 } // namespace scheduler 174 } // namespace scheduler
173 175
174 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 176 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698