| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 InternalSettingsGuardForSettings(); | 455 InternalSettingsGuardForSettings(); |
| 456 settings()->setTimeWithoutMouseMovementBeforeHidingControls(time); | 456 settings()->setTimeWithoutMouseMovementBeforeHidingControls(time); |
| 457 } | 457 } |
| 458 | 458 |
| 459 void InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior(bool enabled,
ExceptionCode& ec) | 459 void InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior(bool enabled,
ExceptionCode& ec) |
| 460 { | 460 { |
| 461 InternalSettingsGuardForSettings(); | 461 InternalSettingsGuardForSettings(); |
| 462 settings()->setUseLegacyBackgroundSizeShorthandBehavior(enabled); | 462 settings()->setUseLegacyBackgroundSizeShorthandBehavior(enabled); |
| 463 } | 463 } |
| 464 | 464 |
| 465 void InternalSettings::setPrimaryPointerDevices(const String& pointerDevice, Exc
eptionCode& ec) |
| 466 { |
| 467 InternalSettingsGuardForSettings(); |
| 468 |
| 469 // Allow setting multiple devices by passing comma seperated list ("mouse,to
uch") |
| 470 Vector<String> deviceTokens; |
| 471 pointerDevice.split(",", false, deviceTokens); |
| 472 |
| 473 int pointerDevices = PointerDeviceUnknown; |
| 474 for(size_t i = 0; i < deviceTokens.size(); ++i) { |
| 475 String token = deviceTokens[i].stripWhiteSpace(); |
| 476 |
| 477 if (token == "mouse") |
| 478 pointerDevices |= PointerDeviceMouse; |
| 479 else if (token == "touch") |
| 480 pointerDevices |= PointerDeviceTouch; |
| 481 else if (token == "none") |
| 482 pointerDevices |= PointerDeviceNone; |
| 483 else if (token == "unknown") |
| 484 pointerDevices |= PointerDeviceUnknown; |
| 485 else { |
| 486 ec = SYNTAX_ERR; |
| 487 return; |
| 488 } |
| 489 } |
| 490 |
| 491 settings()->setPrimaryPointerDevices(pointerDevices); |
| 465 } | 492 } |
| 493 |
| 494 } |
| OLD | NEW |