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

Unified Diff: chrome/renderer/spellchecker/spellcheck.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: Created 9 years, 6 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
Index: chrome/renderer/spellchecker/spellcheck.h
diff --git a/chrome/renderer/spellchecker/spellcheck.h b/chrome/renderer/spellchecker/spellcheck.h
index 28b950762017766c178bef81b8fd28236415d75c..379789febda64fcfd52102f2d51940256bd8abae 100644
--- a/chrome/renderer/spellchecker/spellcheck.h
+++ b/chrome/renderer/spellchecker/spellcheck.h
@@ -21,6 +21,10 @@
class Hunspell;
+namespace chrome {
+class ChromeContentRendererClient;
+}
+
namespace file_util {
class MemoryMappedFile;
}
@@ -29,7 +33,7 @@ class MemoryMappedFile;
// See http://crbug.com/73699.
class SpellCheck : public RenderProcessObserver {
public:
- SpellCheck();
+ explicit SpellCheck(chrome::ChromeContentRendererClient* renderer_client);
virtual ~SpellCheck();
void Init(base::PlatformFile file,
@@ -135,6 +139,10 @@ class SpellCheck : public RenderProcessObserver {
// spelling of a word.
bool initialized_;
+ // Reference to the renderer client, for resetting the spellchecker on low-mem
+ // event. Weak reference.
+ chrome::ChromeContentRendererClient* renderer_client_;
+
DISALLOW_COPY_AND_ASSIGN(SpellCheck);
};

Powered by Google App Engine
This is Rietveld 408576698