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 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 { | 2336 { |
2337 ASSERT(document); | 2337 ASSERT(document); |
2338 return document->ignoreLayoutWithPendingStylesheets(); | 2338 return document->ignoreLayoutWithPendingStylesheets(); |
2339 } | 2339 } |
2340 | 2340 |
2341 void Internals::setNetworkStateNotifierTestOnly(bool testOnly) | 2341 void Internals::setNetworkStateNotifierTestOnly(bool testOnly) |
2342 { | 2342 { |
2343 networkStateNotifier().setTestUpdatesOnly(testOnly); | 2343 networkStateNotifier().setTestUpdatesOnly(testOnly); |
2344 } | 2344 } |
2345 | 2345 |
2346 void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exc
eptionState) | 2346 void Internals::setNetworkConnectionInfo(const String& type, double downlinkMax,
ExceptionState& exceptionState) |
2347 { | 2347 { |
2348 WebConnectionType webtype; | 2348 WebConnectionType webtype; |
2349 if (type == "cellular") { | 2349 if (type == "cellular") { |
2350 webtype = ConnectionTypeCellular; | 2350 webtype = ConnectionTypeCellular; |
2351 } else if (type == "bluetooth") { | 2351 } else if (type == "bluetooth") { |
2352 webtype = ConnectionTypeBluetooth; | 2352 webtype = ConnectionTypeBluetooth; |
2353 } else if (type == "ethernet") { | 2353 } else if (type == "ethernet") { |
2354 webtype = ConnectionTypeEthernet; | 2354 webtype = ConnectionTypeEthernet; |
2355 } else if (type == "wifi") { | 2355 } else if (type == "wifi") { |
2356 webtype = ConnectionTypeWifi; | 2356 webtype = ConnectionTypeWifi; |
| 2357 } else if (type == "wimax") { |
| 2358 webtype = ConnectionTypeWimax; |
2357 } else if (type == "other") { | 2359 } else if (type == "other") { |
2358 webtype = ConnectionTypeOther; | 2360 webtype = ConnectionTypeOther; |
2359 } else if (type == "none") { | 2361 } else if (type == "none") { |
2360 webtype = ConnectionTypeNone; | 2362 webtype = ConnectionTypeNone; |
2361 } else if (type == "unknown") { | 2363 } else if (type == "unknown") { |
2362 webtype = ConnectionTypeUnknown; | 2364 webtype = ConnectionTypeUnknown; |
2363 } else { | 2365 } else { |
2364 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); | 2366 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); |
2365 return; | 2367 return; |
2366 } | 2368 } |
2367 networkStateNotifier().setWebConnectionTypeForTest(webtype); | 2369 networkStateNotifier().setWebConnectionForTest(webtype, downlinkMax); |
2368 } | 2370 } |
2369 | 2371 |
2370 unsigned Internals::countHitRegions(CanvasRenderingContext* context) | 2372 unsigned Internals::countHitRegions(CanvasRenderingContext* context) |
2371 { | 2373 { |
2372 return context->hitRegionsCount(); | 2374 return context->hitRegionsCount(); |
2373 } | 2375 } |
2374 | 2376 |
2375 bool Internals::isInCanvasFontCache(Document* document, const String& fontString
) | 2377 bool Internals::isInCanvasFontCache(Document* document, const String& fontString
) |
2376 { | 2378 { |
2377 return document->canvasFontCache()->isInCache(fontString); | 2379 return document->canvasFontCache()->isInCache(fontString); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2479 | 2481 |
2480 return animator->setScrollbarsVisibleForTesting(visible); | 2482 return animator->setScrollbarsVisibleForTesting(visible); |
2481 } | 2483 } |
2482 | 2484 |
2483 void Internals::forceRestrictIFramePermissions() | 2485 void Internals::forceRestrictIFramePermissions() |
2484 { | 2486 { |
2485 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); | 2487 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); |
2486 } | 2488 } |
2487 | 2489 |
2488 } // namespace blink | 2490 } // namespace blink |
OLD | NEW |