OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. | 598 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. |
599 | 599 |
600 // Request the platform to start listening to the events of the specified | 600 // Request the platform to start listening to the events of the specified |
601 // type and notify the given listener (if not null) when there is an update. | 601 // type and notify the given listener (if not null) when there is an update. |
602 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } | 602 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } |
603 | 603 |
604 // Request the platform to stop listening to the specified event and no | 604 // Request the platform to stop listening to the specified event and no |
605 // longer notify the listener, if any. | 605 // longer notify the listener, if any. |
606 virtual void stopListening(WebPlatformEventType type) { } | 606 virtual void stopListening(WebPlatformEventType type) { } |
607 | 607 |
| 608 // This method converts from the supplied DOM code enum to the |
| 609 // embedder's DOM code value for the key pressed. |domCode| values are |
| 610 // based on the value defined in ui/events/keycodes/dom4/keycode_converter_d
ata.h. |
| 611 // Returns null string, if DOM code value is not found. |
| 612 virtual WebString domCodeStringFromEnum(int domCode) { return WebString(); } |
| 613 |
| 614 // This method converts from the suppled DOM code value to the |
| 615 // embedder's DOM code enum for the key pressed. |codeString| is defined in |
| 616 // ui/events/keycodes/dom4/keycode_converter_data.h. |
| 617 // Returns 0, if DOM code enum is not found. |
| 618 virtual int domEnumFromCodeString(const WebString& codeString) { return 0; } |
| 619 |
608 // Quota ----------------------------------------------------------- | 620 // Quota ----------------------------------------------------------- |
609 | 621 |
610 // Queries the storage partition's storage usage and quota information. | 622 // Queries the storage partition's storage usage and quota information. |
611 // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called | 623 // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called |
612 // with the current usage and quota information for the partition. When | 624 // with the current usage and quota information for the partition. When |
613 // an error occurs WebStorageQuotaCallbacks::didFail is called with an | 625 // an error occurs WebStorageQuotaCallbacks::didFail is called with an |
614 // error code. | 626 // error code. |
615 virtual void queryStorageUsageAndQuota( | 627 virtual void queryStorageUsageAndQuota( |
616 const WebURL& storagePartition, | 628 const WebURL& storagePartition, |
617 WebStorageQuotaType, | 629 WebStorageQuotaType, |
(...skipping 30 matching lines...) Expand all Loading... |
648 | 660 |
649 virtual WebNavigatorConnectProvider* navigatorConnectProvider() { return 0;
} | 661 virtual WebNavigatorConnectProvider* navigatorConnectProvider() { return 0;
} |
650 | 662 |
651 protected: | 663 protected: |
652 virtual ~Platform() { } | 664 virtual ~Platform() { } |
653 }; | 665 }; |
654 | 666 |
655 } // namespace blink | 667 } // namespace blink |
656 | 668 |
657 #endif | 669 #endif |
OLD | NEW |