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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 | 1072 |
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, |
| 1083 const GPUInfo& gpu_info, |
| 1084 const GpuFeatureFlags& gpu_feature_flags) { |
1083 #if defined(OS_POSIX) | 1085 #if defined(OS_POSIX) |
1084 // If we received a ChannelHandle, register it now. | 1086 // If we received a ChannelHandle, register it now. |
1085 if (channel_handle.socket.fd >= 0) | 1087 if (channel_handle.socket.fd >= 0) |
1086 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); | 1088 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); |
1087 #endif | 1089 #endif |
1088 | 1090 |
1089 gpu_channel_->set_gpu_info(gpu_info); | |
1090 | |
1091 if (channel_handle.name.size() != 0) { | 1091 if (channel_handle.name.size() != 0) { |
1092 // Connect to the GPU process if a channel name was received. | 1092 if (gpu_feature_flags.is_accelerated_2d_canvas_blacklisted() || |
1093 gpu_channel_->Connect(channel_handle.name); | 1093 gpu_feature_flags.is_accelerated_compositing_blacklisted() || |
| 1094 gpu_feature_flags.is_webgl_blacklisted()) { |
| 1095 // If any GPU feature is blacklisted, cancel the connection. |
| 1096 gpu_channel_ = NULL; |
| 1097 } else { |
| 1098 // Connect to the GPU process if a channel name was received. |
| 1099 gpu_channel_->set_gpu_info(gpu_info); |
| 1100 gpu_channel_->set_gpu_feature_flags(gpu_feature_flags); |
| 1101 gpu_channel_->Connect(channel_handle.name); |
| 1102 } |
1094 } else { | 1103 } else { |
1095 // Otherwise cancel the connection. | 1104 // Otherwise cancel the connection. |
1096 gpu_channel_ = NULL; | 1105 gpu_channel_ = NULL; |
1097 } | 1106 } |
1098 } | 1107 } |
1099 | 1108 |
1100 void RenderThread::OnSetPhishingModel(IPC::PlatformFileForTransit model_file) { | 1109 void RenderThread::OnSetPhishingModel(IPC::PlatformFileForTransit model_file) { |
1101 safe_browsing::Scorer::CreateFromFile( | 1110 safe_browsing::Scorer::CreateFromFile( |
1102 IPC::PlatformFileForTransitToPlatformFile(model_file), | 1111 IPC::PlatformFileForTransitToPlatformFile(model_file), |
1103 GetFileThreadMessageLoopProxy(), | 1112 GetFileThreadMessageLoopProxy(), |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 } | 1153 } |
1145 | 1154 |
1146 return false; | 1155 return false; |
1147 } | 1156 } |
1148 | 1157 |
1149 void RenderThread::RegisterExtension(v8::Extension* extension, | 1158 void RenderThread::RegisterExtension(v8::Extension* extension, |
1150 bool restrict_to_extensions) { | 1159 bool restrict_to_extensions) { |
1151 WebScriptController::registerExtension(extension); | 1160 WebScriptController::registerExtension(extension); |
1152 v8_extensions_[extension->name()] = restrict_to_extensions; | 1161 v8_extensions_[extension->name()] = restrict_to_extensions; |
1153 } | 1162 } |
OLD | NEW |