| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 309 } |
| 310 | 310 |
| 311 bool RendererBlinkPlatformImpl::sandboxEnabled() { | 311 bool RendererBlinkPlatformImpl::sandboxEnabled() { |
| 312 // As explained in Platform.h, this function is used to decide | 312 // As explained in Platform.h, this function is used to decide |
| 313 // whether to allow file system operations to come out of WebKit or not. | 313 // whether to allow file system operations to come out of WebKit or not. |
| 314 // Even if the sandbox is disabled, there's no reason why the code should | 314 // Even if the sandbox is disabled, there's no reason why the code should |
| 315 // act any differently...unless we're in single process mode. In which | 315 // act any differently...unless we're in single process mode. In which |
| 316 // case, we have no other choice. Platform.h discourages using | 316 // case, we have no other choice. Platform.h discourages using |
| 317 // this switch unless absolutely necessary, so hopefully we won't end up | 317 // this switch unless absolutely necessary, so hopefully we won't end up |
| 318 // with too many code paths being different in single-process mode. | 318 // with too many code paths being different in single-process mode. |
| 319 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); | 319 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 320 switches::kSingleProcess); |
| 320 } | 321 } |
| 321 | 322 |
| 322 unsigned long long RendererBlinkPlatformImpl::visitedLinkHash( | 323 unsigned long long RendererBlinkPlatformImpl::visitedLinkHash( |
| 323 const char* canonical_url, | 324 const char* canonical_url, |
| 324 size_t length) { | 325 size_t length) { |
| 325 return GetContentClient()->renderer()->VisitedLinkHash(canonical_url, length); | 326 return GetContentClient()->renderer()->VisitedLinkHash(canonical_url, length); |
| 326 } | 327 } |
| 327 | 328 |
| 328 bool RendererBlinkPlatformImpl::isLinkVisited(unsigned long long link_hash) { | 329 bool RendererBlinkPlatformImpl::isLinkVisited(unsigned long long link_hash) { |
| 329 return GetContentClient()->renderer()->IsLinkVisited(link_hash); | 330 return GetContentClient()->renderer()->IsLinkVisited(link_hash); |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 //------------------------------------------------------------------------------ | 1224 //------------------------------------------------------------------------------ |
| 1224 | 1225 |
| 1225 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1226 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1226 const blink::WebBatteryStatus& status) { | 1227 const blink::WebBatteryStatus& status) { |
| 1227 if (!g_test_battery_status_listener) | 1228 if (!g_test_battery_status_listener) |
| 1228 return; | 1229 return; |
| 1229 g_test_battery_status_listener->updateBatteryStatus(status); | 1230 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1230 } | 1231 } |
| 1231 | 1232 |
| 1232 } // namespace content | 1233 } // namespace content |
| OLD | NEW |