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

Side by Side 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: Get rid of notification. Forward call from RPO to 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/renderer/content_renderer_client.h" 11 #include "content/renderer/content_renderer_client.h"
12 12
13 class ChromeRenderProcessObserver; 13 class ChromeRenderProcessObserver;
14 class ExtensionDispatcher; 14 class ExtensionDispatcher;
15 class RendererHistogramSnapshots; 15 class RendererHistogramSnapshots;
16 class RendererNetPredictor; 16 class RendererNetPredictor;
17 class SpellCheck; 17 class SpellCheck;
18 class SpellCheckProvider;
18 class VisitedLinkSlave; 19 class VisitedLinkSlave;
19 20
20 namespace safe_browsing { 21 namespace safe_browsing {
21 class PhishingClassifierFilter; 22 class PhishingClassifierFilter;
22 } 23 }
23 24
24 namespace webkit { 25 namespace webkit {
25 namespace npapi { 26 namespace npapi {
26 class PluginGroup; 27 class PluginGroup;
27 } 28 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 size_t length) OVERRIDE; 67 size_t length) OVERRIDE;
67 virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE; 68 virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE;
68 virtual void PrefetchHostName(const char* hostname, size_t length) OVERRIDE; 69 virtual void PrefetchHostName(const char* hostname, size_t length) OVERRIDE;
69 virtual bool ShouldOverridePageVisibilityState( 70 virtual bool ShouldOverridePageVisibilityState(
70 const RenderView* render_view, 71 const RenderView* render_view,
71 WebKit::WebPageVisibilityState* override_state) const OVERRIDE; 72 WebKit::WebPageVisibilityState* override_state) const OVERRIDE;
72 73
73 // For testing. 74 // For testing.
74 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); 75 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher);
75 76
77 // Called in low-memory conditions to dump the memory used by the spellchecker
jam 2011/07/22 16:31:50 nit: why add two methods? i.e. why not just have t
Greg Billock 2011/07/22 17:02:07 Good point. I liked having the caller call OnPurge
78 // and start over.
79 void OnPurgeMemory();
80
76 private: 81 private:
77 WebKit::WebPlugin* CreatePluginPlaceholder( 82 WebKit::WebPlugin* CreatePluginPlaceholder(
78 RenderView* render_view, 83 RenderView* render_view,
79 WebKit::WebFrame* frame, 84 WebKit::WebFrame* frame,
80 const WebKit::WebPluginParams& params, 85 const WebKit::WebPluginParams& params,
81 const webkit::npapi::PluginGroup& group, 86 const webkit::npapi::PluginGroup& group,
82 int resource_id, 87 int resource_id,
83 int message_id, 88 int message_id,
84 bool is_blocked_for_prerendering, 89 bool is_blocked_for_prerendering,
85 bool allow_loading); 90 bool allow_loading);
86 91
87 // Returns true if the frame is navigating to an URL either into or out of an 92 // Returns true if the frame is navigating to an URL either into or out of an
88 // extension app's extent. 93 // extension app's extent.
89 bool CrossesExtensionExtents(WebKit::WebFrame* frame, const GURL& new_url); 94 bool CrossesExtensionExtents(WebKit::WebFrame* frame, const GURL& new_url);
90 95
96 void ResetSpellCheck();
97
91 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; 98 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_;
92 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; 99 scoped_ptr<ExtensionDispatcher> extension_dispatcher_;
93 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; 100 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
94 scoped_ptr<RendererNetPredictor> net_predictor_; 101 scoped_ptr<RendererNetPredictor> net_predictor_;
95 scoped_ptr<SpellCheck> spellcheck_; 102 scoped_ptr<SpellCheck> spellcheck_;
103 scoped_ptr<SpellCheckProvider> spellcheck_provider_;
96 scoped_ptr<VisitedLinkSlave> visited_link_slave_; 104 scoped_ptr<VisitedLinkSlave> visited_link_slave_;
97 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; 105 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_;
98 }; 106 };
99 107
100 } // namespace chrome 108 } // namespace chrome
101 109
102 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 110 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698