| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 UserScriptSlave* user_script_slave() const { | 90 UserScriptSlave* user_script_slave() const { |
| 91 return user_script_slave_.get(); | 91 return user_script_slave_.get(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } | 94 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } |
| 95 | 95 |
| 96 // Do DNS prefetch resolution of a hostname. | 96 // Do DNS prefetch resolution of a hostname. |
| 97 void Resolve(const char* name, size_t length); | 97 void Resolve(const char* name, size_t length); |
| 98 | 98 |
| 99 // Send all the Histogram data to browser. | 99 // Send all the Histogram data to browser. |
| 100 void SendHistograms(); | 100 void SendHistograms(int sequence_number); |
| 101 | 101 |
| 102 // Invokes InformHostOfCacheStats after a short delay. Used to move this | 102 // Invokes InformHostOfCacheStats after a short delay. Used to move this |
| 103 // bookkeeping operation off the critical latency path. | 103 // bookkeeping operation off the critical latency path. |
| 104 void InformHostOfCacheStatsLater(); | 104 void InformHostOfCacheStatsLater(); |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 virtual void OnControlMessageReceived(const IPC::Message& msg); | 107 virtual void OnControlMessageReceived(const IPC::Message& msg); |
| 108 | 108 |
| 109 // Called by the thread base class | 109 // Called by the thread base class |
| 110 virtual void Init(); | 110 virtual void Init(); |
| 111 virtual void CleanUp(); | 111 virtual void CleanUp(); |
| 112 | 112 |
| 113 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); | 113 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); |
| 114 void OnUpdateUserScripts(base::SharedMemoryHandle table); | 114 void OnUpdateUserScripts(base::SharedMemoryHandle table); |
| 115 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); | 115 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); |
| 116 void OnSetNextPageID(int32 next_page_id); | 116 void OnSetNextPageID(int32 next_page_id); |
| 117 void OnCreateNewView(gfx::NativeViewId parent_hwnd, | 117 void OnCreateNewView(gfx::NativeViewId parent_hwnd, |
| 118 ModalDialogEvent modal_dialog_event, | 118 ModalDialogEvent modal_dialog_event, |
| 119 const WebPreferences& webkit_prefs, | 119 const WebPreferences& webkit_prefs, |
| 120 int32 view_id); | 120 int32 view_id); |
| 121 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 121 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
| 122 void OnSetCacheCapacities(size_t min_dead_capacity, | 122 void OnSetCacheCapacities(size_t min_dead_capacity, |
| 123 size_t max_dead_capacity, | 123 size_t max_dead_capacity, |
| 124 size_t capacity); | 124 size_t capacity); |
| 125 void OnGetCacheResourceStats(); | 125 void OnGetCacheResourceStats(); |
| 126 | 126 |
| 127 // Send all histograms to browser. | 127 // Send all histograms to browser. |
| 128 void OnGetRendererHistograms(); | 128 void OnGetRendererHistograms(int sequence_number); |
| 129 | 129 |
| 130 void OnExtensionHandleConnect(int channel_id, const std::string& tab_json); | 130 void OnExtensionHandleConnect(int channel_id, const std::string& tab_json); |
| 131 void OnExtensionHandleMessage(const std::string& message, int channel_id); | 131 void OnExtensionHandleMessage(const std::string& message, int channel_id); |
| 132 void OnExtensionHandleEvent(const std::string event_name, | 132 void OnExtensionHandleEvent(const std::string event_name, |
| 133 const std::string event_data); | 133 const std::string event_data); |
| 134 void OnPurgePluginListCache(); | 134 void OnPurgePluginListCache(); |
| 135 | 135 |
| 136 // Gather usage statistics from the in-memory cache and inform our host. | 136 // Gather usage statistics from the in-memory cache and inform our host. |
| 137 // These functions should be call periodically so that the host can make | 137 // These functions should be call periodically so that the host can make |
| 138 // decisions about how to allocation resources using current information. | 138 // decisions about how to allocation resources using current information. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 160 | 160 |
| 161 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_; | 161 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_; |
| 162 | 162 |
| 163 // If true, then a GetPlugins call is allowed to rescan the disk. | 163 // If true, then a GetPlugins call is allowed to rescan the disk. |
| 164 bool plugin_refresh_allowed_; | 164 bool plugin_refresh_allowed_; |
| 165 | 165 |
| 166 DISALLOW_COPY_AND_ASSIGN(RenderThread); | 166 DISALLOW_COPY_AND_ASSIGN(RenderThread); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 #endif // CHROME_RENDERER_RENDER_THREAD_H_ | 169 #endif // CHROME_RENDERER_RENDER_THREAD_H_ |
| OLD | NEW |