OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_RENDER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
12 #include "base/process.h" | 12 #include "base/process.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/common/transport_dib.h" | 15 #include "chrome/common/transport_dib.h" |
16 #include "chrome/common/visitedlink_common.h" | 16 #include "chrome/common/visitedlink_common.h" |
17 #include "ipc/ipc_sync_channel.h" | 17 #include "ipc/ipc_sync_channel.h" |
18 | 18 |
19 class Profile; | 19 class Profile; |
| 20 class URLRequestContextGetter; |
20 struct ViewMsg_ClosePage_Params; | 21 struct ViewMsg_ClosePage_Params; |
21 | 22 |
22 class URLRequestContextGetter; | 23 namespace base { |
| 24 class SharedMemory; |
| 25 } |
23 | 26 |
24 // Virtual interface that represents the browser side of the browser <-> | 27 // Virtual interface that represents the browser side of the browser <-> |
25 // renderer communication channel. There will generally be one | 28 // renderer communication channel. There will generally be one |
26 // RenderProcessHost per renderer process. | 29 // RenderProcessHost per renderer process. |
27 // | 30 // |
28 // The concrete implementation of this class for normal use is the | 31 // The concrete implementation of this class for normal use is the |
29 // BrowserRenderProcessHost. It may also be implemented by a testing interface | 32 // BrowserRenderProcessHost. It may also be implemented by a testing interface |
30 // for mocking purposes. | 33 // for mocking purposes. |
31 class RenderProcessHost : public IPC::Channel::Sender, | 34 class RenderProcessHost : public IPC::Channel::Sender, |
32 public IPC::Channel::Listener { | 35 public IPC::Channel::Listener { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // unregister visibility. | 169 // unregister visibility. |
167 virtual void WidgetRestored() = 0; | 170 virtual void WidgetRestored() = 0; |
168 virtual void WidgetHidden() = 0; | 171 virtual void WidgetHidden() = 0; |
169 | 172 |
170 // Called when RenderView is created by a listener. | 173 // Called when RenderView is created by a listener. |
171 virtual void ViewCreated() = 0; | 174 virtual void ViewCreated() = 0; |
172 | 175 |
173 // Add a word in the spellchecker. | 176 // Add a word in the spellchecker. |
174 virtual void AddWord(const string16& word) = 0; | 177 virtual void AddWord(const string16& word) = 0; |
175 | 178 |
| 179 // Informs the renderer about a new visited link table. |
| 180 virtual void SendVisitedLinkTable(base::SharedMemory* table_memory) = 0; |
| 181 |
176 // Notify the renderer that a link was visited. | 182 // Notify the renderer that a link was visited. |
177 virtual void AddVisitedLinks( | 183 virtual void AddVisitedLinks( |
178 const VisitedLinkCommon::Fingerprints& links) = 0; | 184 const VisitedLinkCommon::Fingerprints& links) = 0; |
179 | 185 |
180 // Clear internal visited links buffer and ask the renderer to update link | 186 // Clear internal visited links buffer and ask the renderer to update link |
181 // coloring state for all of its links. | 187 // coloring state for all of its links. |
182 virtual void ResetVisitedLinks() = 0; | 188 virtual void ResetVisitedLinks() = 0; |
183 | 189 |
184 // Try to shutdown the associated renderer process as fast as possible. | 190 // Try to shutdown the associated renderer process as fast as possible. |
185 // If this renderer has any RenderViews with unload handlers, then this | 191 // If this renderer has any RenderViews with unload handlers, then this |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // Factory object for RenderProcessHosts. Using this factory allows tests to | 296 // Factory object for RenderProcessHosts. Using this factory allows tests to |
291 // swap out a different one to use a TestRenderProcessHost. | 297 // swap out a different one to use a TestRenderProcessHost. |
292 class RenderProcessHostFactory { | 298 class RenderProcessHostFactory { |
293 public: | 299 public: |
294 virtual ~RenderProcessHostFactory() {} | 300 virtual ~RenderProcessHostFactory() {} |
295 virtual RenderProcessHost* CreateRenderProcessHost( | 301 virtual RenderProcessHost* CreateRenderProcessHost( |
296 Profile* profile) const = 0; | 302 Profile* profile) const = 0; |
297 }; | 303 }; |
298 | 304 |
299 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 305 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
OLD | NEW |