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

Unified Diff: chrome/renderer/chrome_content_renderer_client.h

Issue 7222023: Forward handling of low-mem message to the content renderer client. Add APIs to handle this case. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Don't own SpellCheckProvider in renderer client. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.h
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
index 35c6383df12b71f551e0088dd1f85b101935d7e2..e99d60ff89d10643527161a0fb8ae7535c816ec4 100644
--- a/chrome/renderer/chrome_content_renderer_client.h
+++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -15,6 +15,7 @@ class ExtensionDispatcher;
class RendererHistogramSnapshots;
class RendererNetPredictor;
class SpellCheck;
+class SpellCheckProvider;
class VisitedLinkSlave;
namespace safe_browsing {
@@ -73,6 +74,10 @@ class ChromeContentRendererClient : public content::ContentRendererClient {
// For testing.
void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher);
+ // Called in low-memory conditions to dump the memory used by the spellchecker
+ // and start over.
+ void OnPurgeMemory();
+
private:
WebKit::WebPlugin* CreatePluginImpl(
RenderView* render_view,
@@ -99,6 +104,9 @@ class ChromeContentRendererClient : public content::ContentRendererClient {
scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
scoped_ptr<RendererNetPredictor> net_predictor_;
scoped_ptr<SpellCheck> spellcheck_;
+ // The SpellCheckProvider is a RenderViewObserver, and handles its own
+ // destruction.
+ SpellCheckProvider* spellcheck_provider_;
scoped_ptr<VisitedLinkSlave> visited_link_slave_;
scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_;
};
« no previous file with comments | « no previous file | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698