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_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_RENDER_THREAD_H_ |
6 #define CHROME_RENDERER_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_RENDER_THREAD_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/gfx/native_widget_types.h" |
9 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
10 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
11 #include "base/task.h" | 12 #include "base/task.h" |
12 #include "base/thread.h" | 13 #include "base/thread.h" |
13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
14 #include "chrome/common/ipc_sync_channel.h" | 15 #include "chrome/common/ipc_sync_channel.h" |
15 #include "chrome/common/message_router.h" | 16 #include "chrome/common/message_router.h" |
| 17 #include "chrome/common/modal_dialog_event.h" |
16 | 18 |
17 class SkBitmap; | 19 class SkBitmap; |
18 class Task; | 20 class Task; |
19 class VisitedLinkSlave; | 21 class VisitedLinkSlave; |
20 struct WebPreferences; | 22 struct WebPreferences; |
21 class RenderDnsMaster; | 23 class RenderDnsMaster; |
22 class NotificationService; | 24 class NotificationService; |
23 class UserScriptSlave; | 25 class UserScriptSlave; |
24 | 26 |
25 // The RenderThreadBase is the minimal interface that a RenderView/Widget | 27 // The RenderThreadBase is the minimal interface that a RenderView/Widget |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual void Init(); | 97 virtual void Init(); |
96 virtual void CleanUp(); | 98 virtual void CleanUp(); |
97 | 99 |
98 private: | 100 private: |
99 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); | 101 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); |
100 void OnUpdateUserScripts(base::SharedMemoryHandle table); | 102 void OnUpdateUserScripts(base::SharedMemoryHandle table); |
101 | 103 |
102 void OnPluginMessage(const FilePath& plugin_path, | 104 void OnPluginMessage(const FilePath& plugin_path, |
103 const std::vector<uint8>& data); | 105 const std::vector<uint8>& data); |
104 void OnSetNextPageID(int32 next_page_id); | 106 void OnSetNextPageID(int32 next_page_id); |
105 #if defined(OS_WIN) | 107 void OnCreateNewView(gfx::NativeViewId parent_hwnd, |
106 // TODO(port): we'll need to support that at some point, but it's not clear | 108 ModalDialogEvent modal_dialog_event, |
107 // if we'll be using the same sort of messages for setting this up | |
108 void OnCreateNewView(HWND parent_hwnd, | |
109 HANDLE modal_dialog_event, | |
110 const WebPreferences& webkit_prefs, | 109 const WebPreferences& webkit_prefs, |
111 int32 view_id); | 110 int32 view_id); |
112 #endif | |
113 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 111 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
114 void OnSetCacheCapacities(size_t min_dead_capacity, | 112 void OnSetCacheCapacities(size_t min_dead_capacity, |
115 size_t max_dead_capacity, | 113 size_t max_dead_capacity, |
116 size_t capacity); | 114 size_t capacity); |
117 void OnGetCacheResourceStats(); | 115 void OnGetCacheResourceStats(); |
118 | 116 |
119 // Gather usage statistics from the in-memory cache and inform our host. | 117 // Gather usage statistics from the in-memory cache and inform our host. |
120 // These functions should be call periodically so that the host can make | 118 // These functions should be call periodically so that the host can make |
121 // decisions about how to allocation resources using current information. | 119 // decisions about how to allocation resources using current information. |
122 void InformHostOfCacheStats(); | 120 void InformHostOfCacheStats(); |
(...skipping 21 matching lines...) Expand all Loading... |
144 int in_send_; | 142 int in_send_; |
145 | 143 |
146 DISALLOW_EVIL_CONSTRUCTORS(RenderThread); | 144 DISALLOW_EVIL_CONSTRUCTORS(RenderThread); |
147 }; | 145 }; |
148 | 146 |
149 // The global RenderThread object for this process. Note that this should only | 147 // The global RenderThread object for this process. Note that this should only |
150 // be accessed when running on the render thread itself. | 148 // be accessed when running on the render thread itself. |
151 extern RenderThread* g_render_thread; | 149 extern RenderThread* g_render_thread; |
152 | 150 |
153 #endif // CHROME_RENDERER_RENDER_THREAD_H_ | 151 #endif // CHROME_RENDERER_RENDER_THREAD_H_ |
OLD | NEW |