| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef WebWidgetClient_h | 31 #ifndef WebWidgetClient_h |
| 32 #define WebWidgetClient_h | 32 #define WebWidgetClient_h |
| 33 | 33 |
| 34 #include "WebNavigationPolicy.h" | 34 #include "WebNavigationPolicy.h" |
| 35 #include "public/platform/WebCommon.h" | 35 #include "public/platform/WebCommon.h" |
| 36 #include "public/platform/WebLayerTreeView.h" | 36 #include "public/platform/WebLayerTreeView.h" |
| 37 #include "public/platform/WebPoint.h" | 37 #include "public/platform/WebPoint.h" |
| 38 #include "public/platform/WebRect.h" | 38 #include "public/platform/WebRect.h" |
| 39 #include "public/platform/WebScreenInfo.h" | 39 #include "public/platform/WebScreenInfo.h" |
| 40 #include "public/web/WebMeaningfulLayout.h" |
| 40 #include "public/web/WebTouchAction.h" | 41 #include "public/web/WebTouchAction.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 44 class WebGestureEvent; | 45 class WebGestureEvent; |
| 45 class WebNode; | 46 class WebNode; |
| 46 class WebString; | 47 class WebString; |
| 47 class WebWidget; | 48 class WebWidget; |
| 48 struct WebCursorInfo; | 49 struct WebCursorInfo; |
| 49 struct WebFloatPoint; | 50 struct WebFloatPoint; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 71 | 72 |
| 72 // Return a compositing view used for this widget. This is owned by the | 73 // Return a compositing view used for this widget. This is owned by the |
| 73 // WebWidgetClient. | 74 // WebWidgetClient. |
| 74 virtual WebLayerTreeView* layerTreeView() { return 0; } | 75 virtual WebLayerTreeView* layerTreeView() { return 0; } |
| 75 // FIXME: Remove all overrides of this and change layerTreeView() above to A
SSERT_NOT_REACHED. | 76 // FIXME: Remove all overrides of this and change layerTreeView() above to A
SSERT_NOT_REACHED. |
| 76 virtual bool allowsBrokenNullLayerTreeView() const { return false; } | 77 virtual bool allowsBrokenNullLayerTreeView() const { return false; } |
| 77 | 78 |
| 78 // Called when a call to WebWidget::animate is required | 79 // Called when a call to WebWidget::animate is required |
| 79 virtual void scheduleAnimation() { } | 80 virtual void scheduleAnimation() { } |
| 80 | 81 |
| 81 // Called when one of the following things were involved during the layout: | 82 // Called immediately following the first compositor-driven (frame-generatin
g) layout that |
| 82 // * > 200 text characters | 83 // happened after an interesting document lifecyle change (see WebMeaningful
Layout for details.) |
| 83 // * > 1024 image pixels | 84 virtual void didMeaningfulLayout(WebMeaningfulLayout) {} |
| 84 // * a plugin | |
| 85 // * a canvas | |
| 86 // An approximation for first layout that resulted in pixels on screen. | |
| 87 // Not the best heuristic, and we should replace it with something better. | |
| 88 virtual void didFirstVisuallyNonEmptyLayout() { } | |
| 89 | 85 |
| 90 // The frame's document first layout immediately after the parsing finished. | |
| 91 // Another way to put it: first frame produced after DOMContentLoaded was di
spatched. | |
| 92 virtual void didFirstLayoutAfterFinishedParsing() { } | 86 virtual void didFirstLayoutAfterFinishedParsing() { } |
| 93 | 87 |
| 94 // Called when the widget acquires or loses focus, respectively. | 88 // Called when the widget acquires or loses focus, respectively. |
| 95 virtual void didFocus() { } | 89 virtual void didFocus() { } |
| 96 virtual void didBlur() { } | 90 virtual void didBlur() { } |
| 97 | 91 |
| 98 // Called when the cursor for the widget changes. | 92 // Called when the cursor for the widget changes. |
| 99 virtual void didChangeCursor(const WebCursorInfo&) { } | 93 virtual void didChangeCursor(const WebCursorInfo&) { } |
| 100 | 94 |
| 101 // Called when the widget should be closed. WebWidget::close() should | 95 // Called when the widget should be closed. WebWidget::close() should |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // press or gesture tap. | 178 // press or gesture tap. |
| 185 // Note: This is called even when the mouse down event is prevent default. | 179 // Note: This is called even when the mouse down event is prevent default. |
| 186 virtual void onMouseDown(const WebNode& mouseDownNode) { } | 180 virtual void onMouseDown(const WebNode& mouseDownNode) { } |
| 187 protected: | 181 protected: |
| 188 ~WebWidgetClient() { } | 182 ~WebWidgetClient() { } |
| 189 }; | 183 }; |
| 190 | 184 |
| 191 } // namespace blink | 185 } // namespace blink |
| 192 | 186 |
| 193 #endif | 187 #endif |
| OLD | NEW |