Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 #include "public/web/WebTouchAction.h" | 41 #include "public/web/WebTouchAction.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 class WebGestureEvent; | 45 class WebGestureEvent; |
| 46 class WebNode; | 46 class WebNode; |
| 47 class WebString; | 47 class WebString; |
| 48 class WebWidget; | 48 class WebWidget; |
| 49 struct WebCursorInfo; | 49 struct WebCursorInfo; |
| 50 struct WebFloatPoint; | 50 struct WebFloatPoint; |
| 51 struct WebFloatRect; | |
| 51 struct WebFloatSize; | 52 struct WebFloatSize; |
| 52 struct WebSize; | 53 struct WebSize; |
| 53 | 54 |
| 54 class WebWidgetClient { | 55 class WebWidgetClient { |
| 55 public: | 56 public: |
| 56 // Called when a region of the WebWidget needs to be re-painted. | 57 // Called when a region of the WebWidget needs to be re-painted. |
| 57 virtual void didInvalidateRect(const WebRect&) { } | 58 virtual void didInvalidateRect(const WebRect&) { } |
| 58 | 59 |
| 59 // Called when the Widget has changed size as a result of an auto-resize. | 60 // Called when the Widget has changed size as a result of an auto-resize. |
| 60 virtual void didAutoResize(const WebSize& newSize) { } | 61 virtual void didAutoResize(const WebSize& newSize) { } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 // press or gesture tap. | 169 // press or gesture tap. |
| 169 // Note: This is called even when the mouse down event is prevent default. | 170 // Note: This is called even when the mouse down event is prevent default. |
| 170 virtual void onMouseDown(const WebNode& mouseDownNode) { } | 171 virtual void onMouseDown(const WebNode& mouseDownNode) { } |
| 171 | 172 |
| 172 // Converts the |rect| from Blink's Viewport coordinates to the | 173 // Converts the |rect| from Blink's Viewport coordinates to the |
| 173 // coordinates in the native window used to display the content, in | 174 // coordinates in the native window used to display the content, in |
| 174 // DIP. They're identical in tradional world, but will differ when | 175 // DIP. They're identical in tradional world, but will differ when |
| 175 // use-zoom-for-dsf feature is eanbled, and Viewport coordinates | 176 // use-zoom-for-dsf feature is eanbled, and Viewport coordinates |
| 176 // becomes DSF times larger than window coordinates. | 177 // becomes DSF times larger than window coordinates. |
| 177 // TODO(oshima): Update the comment when the migration is completed. | 178 // TODO(oshima): Update the comment when the migration is completed. |
| 178 virtual void convertViewportToWindow(WebRect* rect) {} | 179 virtual void convertViewportToWindow(WebRect* rect) {} |
|
dgozman
2016/01/26 00:17:45
Perhaps, this one should work with WebFloatRect as
oshima
2016/01/26 00:24:00
Sorry I forgot to mention. Yes, I'm going to chang
| |
| 179 | 180 |
| 181 // Converts the |rect| from the coordinates in native window in | |
| 182 // DIP to Blink's Viewport coordinates. They're identical in | |
| 183 // tradional world, but will differ when use-zoom-for-dsf feature | |
| 184 // is eanbled. TODO(oshima): Update the comment when the | |
| 185 // migration is completed. | |
| 186 virtual void convertWindowToViewport(WebFloatRect* rect) {} | |
| 187 | |
| 180 protected: | 188 protected: |
| 181 ~WebWidgetClient() { } | 189 ~WebWidgetClient() { } |
| 182 }; | 190 }; |
| 183 | 191 |
| 184 } // namespace blink | 192 } // namespace blink |
| 185 | 193 |
| 186 #endif | 194 #endif |
| OLD | NEW |