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

Side by Side Diff: chrome/browser/extensions/extension_process_manager.h

Issue 10804020: Introduce runtime.onSuspendCanceled() event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 // Ensure browser object is not null except for certain situations. 179 // Ensure browser object is not null except for certain situations.
180 void EnsureBrowserWhenRequired(Browser* browser, 180 void EnsureBrowserWhenRequired(Browser* browser,
181 chrome::ViewType view_type); 181 chrome::ViewType view_type);
182 182
183 // These are called when the extension transitions between idle and active. 183 // These are called when the extension transitions between idle and active.
184 // They control the process of closing the background page when idle. 184 // They control the process of closing the background page when idle.
185 void OnLazyBackgroundPageIdle(const std::string& extension_id, 185 void OnLazyBackgroundPageIdle(const std::string& extension_id,
186 int sequence_id); 186 int sequence_id);
187 void OnLazyBackgroundPageActive(const std::string& extension_id); 187 void OnLazyBackgroundPageActive(const std::string& extension_id);
188 void CloseLazyBackgroundPageNow(const std::string& extension_id); 188 void CloseLazyBackgroundPageNow(const std::string& extension_id,
189 int sequence_id);
189 190
190 // Updates a potentially-registered RenderViewHost once it has been 191 // Updates a potentially-registered RenderViewHost once it has been
191 // associated with a WebContents. This allows us to gather information that 192 // associated with a WebContents. This allows us to gather information that
192 // was not available when the host was first registered. 193 // was not available when the host was first registered.
193 void UpdateRegisteredRenderView(content::RenderViewHost* render_view_host); 194 void UpdateRegisteredRenderView(content::RenderViewHost* render_view_host);
194 195
195 // Clears background page data for this extension. 196 // Clears background page data for this extension.
196 void ClearBackgroundPageData(const std::string& extension_id); 197 void ClearBackgroundPageData(const std::string& extension_id);
197 198
198 BackgroundPageDataMap background_page_data_; 199 BackgroundPageDataMap background_page_data_;
199 200
200 // The time to delay between an extension becoming idle and 201 // The time to delay between an extension becoming idle and
201 // sending a ShouldUnload message; read from command-line switch. 202 // sending a ShouldUnload message; read from command-line switch.
202 base::TimeDelta event_page_idle_time_; 203 base::TimeDelta event_page_idle_time_;
203 204
204 // The time to delay between sending a ShouldUnload message and 205 // The time to delay between sending a ShouldUnload message and
205 // sending a Unload message; read from command-line switch. 206 // sending a Unload message; read from command-line switch.
206 base::TimeDelta event_page_unloading_time_; 207 base::TimeDelta event_page_unloading_time_;
207 208
208 base::WeakPtrFactory<ExtensionProcessManager> weak_ptr_factory_; 209 base::WeakPtrFactory<ExtensionProcessManager> weak_ptr_factory_;
209 210
210 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); 211 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager);
211 }; 212 };
212 213
213 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 214 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698