OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // |tappedNode| is the node that the mouseDown event hit, provided so the | 153 // |tappedNode| is the node that the mouseDown event hit, provided so the |
154 // UI can be shown only on certain kinds of nodes in specific locations. | 154 // UI can be shown only on certain kinds of nodes in specific locations. |
155 // |pageChanged| is true if and only if the DOM tree or style was | 155 // |pageChanged| is true if and only if the DOM tree or style was |
156 // modified during the dispatch of the mouse*, or click events associated | 156 // modified during the dispatch of the mouse*, or click events associated |
157 // with the tap. | 157 // with the tap. |
158 // This provides a heuristic to help identify when a page is doing | 158 // This provides a heuristic to help identify when a page is doing |
159 // something as a result of a tap without explicitly consuming the event. | 159 // something as a result of a tap without explicitly consuming the event. |
160 virtual void showUnhandledTapUIIfNeeded(const WebPoint& tappedPosition, | 160 virtual void showUnhandledTapUIIfNeeded(const WebPoint& tappedPosition, |
161 const WebNode& tappedNode, bool pageChanged) { } | 161 const WebNode& tappedNode, bool pageChanged) { } |
162 | 162 |
163 // Called immediately after a mousedown event is dispatched due to a mouse | |
164 // press or gesture tap. | |
165 // Note: This is called even when the mouse down event is prevent default. | |
166 virtual void onMouseDown(const WebNode& mouseDownNode) { } | |
167 | |
168 // Converts the |rect| from Blink's Viewport coordinates to the | 163 // Converts the |rect| from Blink's Viewport coordinates to the |
169 // coordinates in the native window used to display the content, in | 164 // coordinates in the native window used to display the content, in |
170 // DIP. They're identical in tradional world, but will differ when | 165 // DIP. They're identical in tradional world, but will differ when |
171 // use-zoom-for-dsf feature is eanbled, and Viewport coordinates | 166 // use-zoom-for-dsf feature is eanbled, and Viewport coordinates |
172 // becomes DSF times larger than window coordinates. | 167 // becomes DSF times larger than window coordinates. |
173 // TODO(oshima): Update the comment when the migration is completed. | 168 // TODO(oshima): Update the comment when the migration is completed. |
174 virtual void convertViewportToWindow(WebRect* rect) {} | 169 virtual void convertViewportToWindow(WebRect* rect) {} |
175 | 170 |
176 // Converts the |rect| from the coordinates in native window in | 171 // Converts the |rect| from the coordinates in native window in |
177 // DIP to Blink's Viewport coordinates. They're identical in | 172 // DIP to Blink's Viewport coordinates. They're identical in |
178 // tradional world, but will differ when use-zoom-for-dsf feature | 173 // tradional world, but will differ when use-zoom-for-dsf feature |
179 // is eanbled. TODO(oshima): Update the comment when the | 174 // is eanbled. TODO(oshima): Update the comment when the |
180 // migration is completed. | 175 // migration is completed. |
181 virtual void convertWindowToViewport(WebFloatRect* rect) {} | 176 virtual void convertWindowToViewport(WebFloatRect* rect) {} |
182 | 177 |
183 protected: | 178 protected: |
184 ~WebWidgetClient() { } | 179 ~WebWidgetClient() { } |
185 }; | 180 }; |
186 | 181 |
187 } // namespace blink | 182 } // namespace blink |
188 | 183 |
189 #endif | 184 #endif |
OLD | NEW |