| 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 20 matching lines...) Expand all Loading... |
| 31 #ifndef BaseClickableWithKeyInputType_h | 31 #ifndef BaseClickableWithKeyInputType_h |
| 32 #define BaseClickableWithKeyInputType_h | 32 #define BaseClickableWithKeyInputType_h |
| 33 | 33 |
| 34 #include "core/html/forms/InputType.h" | 34 #include "core/html/forms/InputType.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 // Base of input types that dispatches a simulated click on space/return key. | 38 // Base of input types that dispatches a simulated click on space/return key. |
| 39 class BaseClickableWithKeyInputType : public InputType { | 39 class BaseClickableWithKeyInputType : public InputType { |
| 40 public: | 40 public: |
| 41 static void handleKeydownEvent(HTMLInputElement*, KeyboardEvent*); | 41 static void handleKeydownEvent(HTMLInputElement&, KeyboardEvent*); |
| 42 static void handleKeypressEvent(HTMLInputElement*, KeyboardEvent*); | 42 static void handleKeypressEvent(HTMLInputElement&, KeyboardEvent*); |
| 43 static void handleKeyupEvent(InputType&, KeyboardEvent*); | 43 static void handleKeyupEvent(InputType&, KeyboardEvent*); |
| 44 static void accessKeyAction(HTMLInputElement*, bool sendMouseEvents); | 44 static void accessKeyAction(HTMLInputElement&, bool sendMouseEvents); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 BaseClickableWithKeyInputType(HTMLInputElement* element) : InputType(element
) { } | 47 BaseClickableWithKeyInputType(HTMLInputElement& element) : InputType(element
) { } |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; | 50 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; |
| 51 virtual void handleKeypressEvent(KeyboardEvent*) OVERRIDE; | 51 virtual void handleKeypressEvent(KeyboardEvent*) OVERRIDE; |
| 52 virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE; | 52 virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE; |
| 53 virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE; | 53 virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace WebCore | 56 } // namespace WebCore |
| 57 | 57 |
| 58 #endif // BaseClickableWithKeyInputType_h | 58 #endif // BaseClickableWithKeyInputType_h |
| OLD | NEW |