| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2385 | 2385 |
| 2386 void Internals::setNetworkStateNotifierTestOnly(bool testOnly) | 2386 void Internals::setNetworkStateNotifierTestOnly(bool testOnly) |
| 2387 { | 2387 { |
| 2388 networkStateNotifier().setTestUpdatesOnly(testOnly); | 2388 networkStateNotifier().setTestUpdatesOnly(testOnly); |
| 2389 } | 2389 } |
| 2390 | 2390 |
| 2391 void Internals::setNetworkConnectionInfo(const String& type, double downlinkMaxM
bps, ExceptionState& exceptionState) | 2391 void Internals::setNetworkConnectionInfo(const String& type, double downlinkMaxM
bps, ExceptionState& exceptionState) |
| 2392 { | 2392 { |
| 2393 WebConnectionType webtype; | 2393 WebConnectionType webtype; |
| 2394 if (type == "cellular") { | 2394 if (type == "cellular") { |
| 2395 webtype = ConnectionTypeCellular; | 2395 webtype = WebConnectionTypeCellular; |
| 2396 } else if (type == "bluetooth") { | 2396 } else if (type == "bluetooth") { |
| 2397 webtype = ConnectionTypeBluetooth; | 2397 webtype = WebConnectionTypeBluetooth; |
| 2398 } else if (type == "ethernet") { | 2398 } else if (type == "ethernet") { |
| 2399 webtype = ConnectionTypeEthernet; | 2399 webtype = WebConnectionTypeEthernet; |
| 2400 } else if (type == "wifi") { | 2400 } else if (type == "wifi") { |
| 2401 webtype = ConnectionTypeWifi; | 2401 webtype = WebConnectionTypeWifi; |
| 2402 } else if (type == "wimax") { | 2402 } else if (type == "wimax") { |
| 2403 webtype = ConnectionTypeWimax; | 2403 webtype = WebConnectionTypeWimax; |
| 2404 } else if (type == "other") { | 2404 } else if (type == "other") { |
| 2405 webtype = ConnectionTypeOther; | 2405 webtype = WebConnectionTypeOther; |
| 2406 } else if (type == "none") { | 2406 } else if (type == "none") { |
| 2407 webtype = ConnectionTypeNone; | 2407 webtype = WebConnectionTypeNone; |
| 2408 } else if (type == "unknown") { | 2408 } else if (type == "unknown") { |
| 2409 webtype = ConnectionTypeUnknown; | 2409 webtype = WebConnectionTypeUnknown; |
| 2410 } else { | 2410 } else { |
| 2411 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); | 2411 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); |
| 2412 return; | 2412 return; |
| 2413 } | 2413 } |
| 2414 networkStateNotifier().setWebConnectionForTest(webtype, downlinkMaxMbps); | 2414 networkStateNotifier().setWebConnectionForTest(webtype, downlinkMaxMbps); |
| 2415 } | 2415 } |
| 2416 | 2416 |
| 2417 unsigned Internals::countHitRegions(CanvasRenderingContext* context) | 2417 unsigned Internals::countHitRegions(CanvasRenderingContext* context) |
| 2418 { | 2418 { |
| 2419 return context->hitRegionsCount(); | 2419 return context->hitRegionsCount(); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2522 | 2522 |
| 2523 return animator->setScrollbarsVisibleForTesting(visible); | 2523 return animator->setScrollbarsVisibleForTesting(visible); |
| 2524 } | 2524 } |
| 2525 | 2525 |
| 2526 void Internals::forceRestrictIFramePermissions() | 2526 void Internals::forceRestrictIFramePermissions() |
| 2527 { | 2527 { |
| 2528 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); | 2528 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); |
| 2529 } | 2529 } |
| 2530 | 2530 |
| 2531 } // namespace blink | 2531 } // namespace blink |
| OLD | NEW |