OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 virtual int GetNextRoutingID(); | 63 virtual int GetNextRoutingID(); |
64 virtual void CancelResourceRequests(int render_widget_id); | 64 virtual void CancelResourceRequests(int render_widget_id); |
65 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); | 65 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); |
66 virtual bool WaitForPaintMsg(int render_widget_id, | 66 virtual bool WaitForPaintMsg(int render_widget_id, |
67 const base::TimeDelta& max_delay, | 67 const base::TimeDelta& max_delay, |
68 IPC::Message* msg); | 68 IPC::Message* msg); |
69 virtual void ReceivedBadMessage(uint16 msg_type); | 69 virtual void ReceivedBadMessage(uint16 msg_type); |
70 virtual void WidgetRestored(); | 70 virtual void WidgetRestored(); |
71 virtual void WidgetHidden(); | 71 virtual void WidgetHidden(); |
72 virtual void ViewCreated(); | 72 virtual void ViewCreated(); |
73 virtual void AddWord(const string16& word); | |
74 virtual void SendVisitedLinkTable(base::SharedMemory* table_memory); | 73 virtual void SendVisitedLinkTable(base::SharedMemory* table_memory); |
75 virtual void AddVisitedLinks(const VisitedLinkCommon::Fingerprints& links); | 74 virtual void AddVisitedLinks(const VisitedLinkCommon::Fingerprints& links); |
76 virtual void ResetVisitedLinks(); | 75 virtual void ResetVisitedLinks(); |
77 virtual bool FastShutdownIfPossible(); | 76 virtual bool FastShutdownIfPossible(); |
78 virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms); | 77 virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms); |
79 virtual base::ProcessHandle GetHandle(); | 78 virtual base::ProcessHandle GetHandle(); |
80 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); | 79 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); |
81 | 80 |
82 // IPC::Channel::Sender via RenderProcessHost. | 81 // IPC::Channel::Sender via RenderProcessHost. |
83 virtual bool Send(IPC::Message* msg); | 82 virtual bool Send(IPC::Message* msg); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // Copies applicable command line switches from the given |browser_cmd| line | 134 // Copies applicable command line switches from the given |browser_cmd| line |
136 // flags to the output |renderer_cmd| line flags. Not all switches will be | 135 // flags to the output |renderer_cmd| line flags. Not all switches will be |
137 // copied over. | 136 // copied over. |
138 void PropogateBrowserCommandLineToRenderer(const CommandLine& browser_cmd, | 137 void PropogateBrowserCommandLineToRenderer(const CommandLine& browser_cmd, |
139 CommandLine* renderer_cmd) const; | 138 CommandLine* renderer_cmd) const; |
140 | 139 |
141 // Callers can reduce the RenderProcess' priority. | 140 // Callers can reduce the RenderProcess' priority. |
142 // Returns true if the priority is backgrounded; false otherwise. | 141 // Returns true if the priority is backgrounded; false otherwise. |
143 void SetBackgrounded(bool boost); | 142 void SetBackgrounded(bool boost); |
144 | 143 |
145 #if defined(SPELLCHECKER_IN_RENDERER) | |
146 // The renderer has requested that we initialize its spellchecker. This should | 144 // The renderer has requested that we initialize its spellchecker. This should |
147 // generally only be called once per session, as after the first call, all | 145 // generally only be called once per session, as after the first call, all |
148 // future renderers will be passed the initialization information on startup | 146 // future renderers will be passed the initialization information on startup |
149 // (or when the dictionary changes in some way). | 147 // (or when the dictionary changes in some way). |
150 void OnSpellCheckerRequestDictionary(); | 148 void OnSpellCheckerRequestDictionary(); |
151 | 149 |
152 // Tell the renderer of a new word that has been added to the custom | 150 // Tell the renderer of a new word that has been added to the custom |
153 // dictionary. | 151 // dictionary. |
154 void AddSpellCheckWord(const std::string& word); | 152 void AddSpellCheckWord(const std::string& word); |
155 | 153 |
156 // Pass the renderer some basic intialization information. Note that the | 154 // Pass the renderer some basic intialization information. Note that the |
157 // renderer will not load Hunspell until it needs to. | 155 // renderer will not load Hunspell until it needs to. |
158 void InitSpellChecker(); | 156 void InitSpellChecker(); |
159 | 157 |
160 // Tell the renderer that auto spell correction has been enabled/disabled. | 158 // Tell the renderer that auto spell correction has been enabled/disabled. |
161 void EnableAutoSpellCorrect(bool enable); | 159 void EnableAutoSpellCorrect(bool enable); |
162 #endif | |
163 | 160 |
164 NotificationRegistrar registrar_; | 161 NotificationRegistrar registrar_; |
165 | 162 |
166 // The count of currently visible widgets. Since the host can be a container | 163 // The count of currently visible widgets. Since the host can be a container |
167 // for multiple widgets, it uses this count to determine when it should be | 164 // for multiple widgets, it uses this count to determine when it should be |
168 // backgrounded. | 165 // backgrounded. |
169 int32 visible_widgets_; | 166 int32 visible_widgets_; |
170 | 167 |
171 // Does this process have backgrounded priority. | 168 // Does this process have backgrounded priority. |
172 bool backgrounded_; | 169 bool backgrounded_; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 // Messages we queue while waiting for the process handle. We queue them here | 205 // Messages we queue while waiting for the process handle. We queue them here |
209 // instead of in the channel so that we ensure they're sent after init related | 206 // instead of in the channel so that we ensure they're sent after init related |
210 // messages that are sent once the process handle is available. This is | 207 // messages that are sent once the process handle is available. This is |
211 // because the queued messages may have dependencies on the init messages. | 208 // because the queued messages may have dependencies on the init messages. |
212 std::queue<IPC::Message*> queued_messages_; | 209 std::queue<IPC::Message*> queued_messages_; |
213 | 210 |
214 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); | 211 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); |
215 }; | 212 }; |
216 | 213 |
217 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 214 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |