OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { | 1073 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { |
1074 spellchecker_->EnableAutoSpellCorrect(enable); | 1074 spellchecker_->EnableAutoSpellCorrect(enable); |
1075 } | 1075 } |
1076 | 1076 |
1077 void RenderThread::OnSetIsIncognitoProcess(bool is_incognito_process) { | 1077 void RenderThread::OnSetIsIncognitoProcess(bool is_incognito_process) { |
1078 is_incognito_process_ = is_incognito_process; | 1078 is_incognito_process_ = is_incognito_process; |
1079 } | 1079 } |
1080 | 1080 |
1081 void RenderThread::OnGpuChannelEstablished( | 1081 void RenderThread::OnGpuChannelEstablished( |
1082 const IPC::ChannelHandle& channel_handle, const GPUInfo& gpu_info) { | 1082 const IPC::ChannelHandle& channel_handle, const GPUInfo& gpu_info) { |
1083 #if defined(OS_POSIX) | |
1084 // If we received a ChannelHandle, register it now. | |
1085 if (channel_handle.socket.fd >= 0) | |
1086 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); | |
1087 #endif | |
1088 | |
1089 gpu_channel_->set_gpu_info(gpu_info); | 1083 gpu_channel_->set_gpu_info(gpu_info); |
1090 | 1084 |
1091 if (channel_handle.name.size() != 0) { | 1085 if (channel_handle.name.size() != 0) { |
1092 // Connect to the GPU process if a channel name was received. | 1086 // Connect to the GPU process if a channel name was received. |
1093 gpu_channel_->Connect(channel_handle.name); | 1087 gpu_channel_->Connect(channel_handle); |
1094 } else { | 1088 } else { |
1095 // Otherwise cancel the connection. | 1089 // Otherwise cancel the connection. |
1096 gpu_channel_ = NULL; | 1090 gpu_channel_ = NULL; |
1097 } | 1091 } |
1098 } | 1092 } |
1099 | 1093 |
1100 void RenderThread::OnSetPhishingModel(IPC::PlatformFileForTransit model_file) { | 1094 void RenderThread::OnSetPhishingModel(IPC::PlatformFileForTransit model_file) { |
1101 safe_browsing::Scorer::CreateFromFile( | 1095 safe_browsing::Scorer::CreateFromFile( |
1102 IPC::PlatformFileForTransitToPlatformFile(model_file), | 1096 IPC::PlatformFileForTransitToPlatformFile(model_file), |
1103 GetFileThreadMessageLoopProxy(), | 1097 GetFileThreadMessageLoopProxy(), |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 } | 1138 } |
1145 | 1139 |
1146 return false; | 1140 return false; |
1147 } | 1141 } |
1148 | 1142 |
1149 void RenderThread::RegisterExtension(v8::Extension* extension, | 1143 void RenderThread::RegisterExtension(v8::Extension* extension, |
1150 bool restrict_to_extensions) { | 1144 bool restrict_to_extensions) { |
1151 WebScriptController::registerExtension(extension); | 1145 WebScriptController::registerExtension(extension); |
1152 v8_extensions_[extension->name()] = restrict_to_extensions; | 1146 v8_extensions_[extension->name()] = restrict_to_extensions; |
1153 } | 1147 } |
OLD | NEW |