| 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/location.h" | 10 #include "base/location.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 sudden_termination_disables_++; | 416 sudden_termination_disables_++; |
| 417 if (sudden_termination_disables_ != 1) | 417 if (sudden_termination_disables_ != 1) |
| 418 return; | 418 return; |
| 419 } | 419 } |
| 420 | 420 |
| 421 RenderThread* thread = RenderThread::Get(); | 421 RenderThread* thread = RenderThread::Get(); |
| 422 if (thread) // NULL in unittests. | 422 if (thread) // NULL in unittests. |
| 423 thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled)); | 423 thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled)); |
| 424 } | 424 } |
| 425 | 425 |
| 426 bool RendererBlinkPlatformImpl::canGrantUniversalAccess() { |
| 427 if (!GetContentClient() |
| 428 ->renderer() |
| 429 ->ShouldEnforceUniversalAccessRestrictions()) { |
| 430 return true; |
| 431 } |
| 432 bool is_access_grantable = false; |
| 433 RenderThread::Get()->Send( |
| 434 new RenderProcessHostMsg_GetUniversalAccessDisposition( |
| 435 &is_access_grantable)); |
| 436 return is_access_grantable; |
| 437 } |
| 438 |
| 426 WebStorageNamespace* RendererBlinkPlatformImpl::createLocalStorageNamespace() { | 439 WebStorageNamespace* RendererBlinkPlatformImpl::createLocalStorageNamespace() { |
| 427 return new WebStorageNamespaceImpl(); | 440 return new WebStorageNamespaceImpl(); |
| 428 } | 441 } |
| 429 | 442 |
| 430 | 443 |
| 431 //------------------------------------------------------------------------------ | 444 //------------------------------------------------------------------------------ |
| 432 | 445 |
| 433 WebIDBFactory* RendererBlinkPlatformImpl::idbFactory() { | 446 WebIDBFactory* RendererBlinkPlatformImpl::idbFactory() { |
| 434 return web_idb_factory_.get(); | 447 return web_idb_factory_.get(); |
| 435 } | 448 } |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 //------------------------------------------------------------------------------ | 1301 //------------------------------------------------------------------------------ |
| 1289 | 1302 |
| 1290 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1303 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1291 const blink::WebBatteryStatus& status) { | 1304 const blink::WebBatteryStatus& status) { |
| 1292 if (!g_test_battery_status_listener) | 1305 if (!g_test_battery_status_listener) |
| 1293 return; | 1306 return; |
| 1294 g_test_battery_status_listener->updateBatteryStatus(status); | 1307 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1295 } | 1308 } |
| 1296 | 1309 |
| 1297 } // namespace content | 1310 } // namespace content |
| OLD | NEW |