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 ad629bd7abeee5c0bcd6e2bc7b33dd97373138fc..ec3ba90d9dbc1c4cdf5c10c8b3730714bbf67576 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.h |
+++ b/chrome/renderer/chrome_content_renderer_client.h |
@@ -8,6 +8,8 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
+#include "content/common/notification_observer.h" |
+#include "content/common/notification_registrar.h" |
#include "content/renderer/content_renderer_client.h" |
class ChromeRenderProcessObserver; |
@@ -15,6 +17,7 @@ class ExtensionDispatcher; |
class RendererHistogramSnapshots; |
class RendererNetPredictor; |
class SpellCheck; |
+class SpellCheckProvider; |
class VisitedLinkSlave; |
namespace safe_browsing { |
@@ -29,7 +32,8 @@ class PluginGroup; |
namespace chrome { |
-class ChromeContentRendererClient : public content::ContentRendererClient { |
+class ChromeContentRendererClient : public content::ContentRendererClient, |
+ public NotificationObserver { |
public: |
ChromeContentRendererClient(); |
virtual ~ChromeContentRendererClient(); |
@@ -73,6 +77,15 @@ class ChromeContentRendererClient : public content::ContentRendererClient { |
// For testing. |
void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); |
+ // NotificationObserver |
+ void Observe(int type, |
+ const NotificationSource& source, |
+ const NotificationDetails& details) OVERRIDE; |
+ |
+ // Called in low-memory conditions to dump the memory used by the spellchecker |
+ // and start over. |
+ void ResetSpellCheck(); |
+ |
private: |
WebKit::WebPlugin* CreatePluginPlaceholder( |
RenderView* render_view, |
@@ -93,8 +106,11 @@ class ChromeContentRendererClient : public content::ContentRendererClient { |
scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; |
scoped_ptr<RendererNetPredictor> net_predictor_; |
scoped_ptr<SpellCheck> spellcheck_; |
+ scoped_ptr<SpellCheckProvider> spellcheck_provider_; |
scoped_ptr<VisitedLinkSlave> visited_link_slave_; |
scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
+ |
+ NotificationRegistrar registrar_; |
}; |
} // namespace chrome |