| 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 #include "chrome/renderer/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 IPC_MESSAGE_HANDLER(ViewMsg_UserScripts_NewScripts, | 167 IPC_MESSAGE_HANDLER(ViewMsg_UserScripts_NewScripts, |
| 168 OnUpdateUserScripts) | 168 OnUpdateUserScripts) |
| 169 IPC_MESSAGE_HANDLER(ViewMsg_Extension_SetFunctionNames, | 169 IPC_MESSAGE_HANDLER(ViewMsg_Extension_SetFunctionNames, |
| 170 OnSetExtensionFunctionNames) | 170 OnSetExtensionFunctionNames) |
| 171 IPC_END_MESSAGE_MAP() | 171 IPC_END_MESSAGE_MAP() |
| 172 } | 172 } |
| 173 | 173 |
| 174 void RenderThread::OnSetNextPageID(int32 next_page_id) { | 174 void RenderThread::OnSetNextPageID(int32 next_page_id) { |
| 175 // This should only be called at process initialization time, so we shouldn't | 175 // This should only be called at process initialization time, so we shouldn't |
| 176 // have to worry about thread-safety. | 176 // have to worry about thread-safety. |
| 177 // TODO(port) | |
| 178 #if !defined(OS_LINUX) | |
| 179 RenderView::SetNextPageID(next_page_id); | 177 RenderView::SetNextPageID(next_page_id); |
| 180 #endif | |
| 181 } | 178 } |
| 182 | 179 |
| 183 void RenderThread::OnCreateNewView(gfx::NativeViewId parent_hwnd, | 180 void RenderThread::OnCreateNewView(gfx::NativeViewId parent_hwnd, |
| 184 ModalDialogEvent modal_dialog_event, | 181 ModalDialogEvent modal_dialog_event, |
| 185 const WebPreferences& webkit_prefs, | 182 const WebPreferences& webkit_prefs, |
| 186 int32 view_id) { | 183 int32 view_id) { |
| 187 EnsureWebKitInitialized(); | 184 EnsureWebKitInitialized(); |
| 188 | 185 |
| 189 // When bringing in render_view, also bring in webkit's glue and jsbindings. | 186 // When bringing in render_view, also bring in webkit's glue and jsbindings. |
| 190 base::WaitableEvent* waitable_event = new base::WaitableEvent( | 187 base::WaitableEvent* waitable_event = new base::WaitableEvent( |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 273 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 277 if (command_line.HasSwitch(switches::kPlaybackMode) || | 274 if (command_line.HasSwitch(switches::kPlaybackMode) || |
| 278 command_line.HasSwitch(switches::kRecordMode)) { | 275 command_line.HasSwitch(switches::kRecordMode)) { |
| 279 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); | 276 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); |
| 280 } | 277 } |
| 281 | 278 |
| 282 if (command_line.HasSwitch(switches::kEnableWebWorkers)) { | 279 if (command_line.HasSwitch(switches::kEnableWebWorkers)) { |
| 283 WebKit::enableWebWorkers(); | 280 WebKit::enableWebWorkers(); |
| 284 } | 281 } |
| 285 } | 282 } |
| OLD | NEW |