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 23 matching lines...) Expand all Loading... | |
| 34 #include "WebNavigationPolicy.h" | 34 #include "WebNavigationPolicy.h" |
| 35 #include "WebScreenInfo.h" | 35 #include "WebScreenInfo.h" |
| 36 #include "platform/WebCommon.h" | 36 #include "platform/WebCommon.h" |
| 37 #include "platform/WebRect.h" | 37 #include "platform/WebRect.h" |
| 38 | 38 |
| 39 namespace WebKit { | 39 namespace WebKit { |
| 40 | 40 |
| 41 class WebString; | 41 class WebString; |
| 42 class WebWidget; | 42 class WebWidget; |
| 43 struct WebCursorInfo; | 43 struct WebCursorInfo; |
| 44 struct WebSize; | |
| 44 | 45 |
| 45 class WebWidgetClient { | 46 class WebWidgetClient { |
| 46 public: | 47 public: |
| 47 // Called when a region of the WebWidget needs to be re-painted. | 48 // Called when a region of the WebWidget needs to be re-painted. |
| 48 virtual void didInvalidateRect(const WebRect&) { } | 49 virtual void didInvalidateRect(const WebRect&) { } |
| 49 | 50 |
| 50 // Called when a region of the WebWidget, given by clipRect, should be | 51 // Called when a region of the WebWidget, given by clipRect, should be |
| 51 // scrolled by the specified dx and dy amounts. | 52 // scrolled by the specified dx and dy amounts. |
| 52 virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) { } | 53 virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) { } |
| 53 | 54 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 // WebWidget into fullscreen mode. Similarly, when exitFullScreen is | 98 // WebWidget into fullscreen mode. Similarly, when exitFullScreen is |
| 98 // called, WebWidget::{will,Did}ExitFullScreen should bound resizing the | 99 // called, WebWidget::{will,Did}ExitFullScreen should bound resizing the |
| 99 // WebWidget out of fullscreen mode. | 100 // WebWidget out of fullscreen mode. |
| 100 virtual bool enterFullScreen() { return false; } | 101 virtual bool enterFullScreen() { return false; } |
| 101 virtual void exitFullScreen() { } | 102 virtual void exitFullScreen() { } |
| 102 | 103 |
| 103 // Called to get/set the position of the widget in screen coordinates. | 104 // Called to get/set the position of the widget in screen coordinates. |
| 104 virtual WebRect windowRect() { return WebRect(); } | 105 virtual WebRect windowRect() { return WebRect(); } |
| 105 virtual void setWindowRect(const WebRect&) { } | 106 virtual void setWindowRect(const WebRect&) { } |
| 106 | 107 |
| 108 // Called to indicate that the Widget has changed size as a result of an | |
| 109 // auto size. | |
| 110 virtual void setSize(const WebSize&) { } | |
|
darin (slow to review)
2011/11/30 23:29:05
didResize or didChangeSize seems better to me.
levin
2011/12/01 20:23:45
Made it didAutoResize to reflect the fact that it
| |
| 111 | |
| 107 // Called when a tooltip should be shown at the current cursor position. | 112 // Called when a tooltip should be shown at the current cursor position. |
| 108 virtual void setToolTipText(const WebString&, WebTextDirection hint) { } | 113 virtual void setToolTipText(const WebString&, WebTextDirection hint) { } |
| 109 | 114 |
| 110 // Called to get the position of the resizer rect in window coordinates. | 115 // Called to get the position of the resizer rect in window coordinates. |
| 111 virtual WebRect windowResizerRect() { return WebRect(); } | 116 virtual WebRect windowResizerRect() { return WebRect(); } |
| 112 | 117 |
| 113 // Called to get the position of the root window containing the widget | 118 // Called to get the position of the root window containing the widget |
| 114 // in screen coordinates. | 119 // in screen coordinates. |
| 115 virtual WebRect rootWindowRect() { return WebRect(); } | 120 virtual WebRect rootWindowRect() { return WebRect(); } |
| 116 | 121 |
| 117 // Called to query information about the screen where this widget is | 122 // Called to query information about the screen where this widget is |
| 118 // displayed. | 123 // displayed. |
| 119 virtual WebScreenInfo screenInfo() { return WebScreenInfo(); } | 124 virtual WebScreenInfo screenInfo() { return WebScreenInfo(); } |
| 120 | 125 |
| 121 // When this method gets called, WebWidgetClient implementation should | 126 // When this method gets called, WebWidgetClient implementation should |
| 122 // reset the input method by cancelling any ongoing composition. | 127 // reset the input method by cancelling any ongoing composition. |
| 123 virtual void resetInputMethod() { } | 128 virtual void resetInputMethod() { } |
| 124 | 129 |
| 125 protected: | 130 protected: |
| 126 ~WebWidgetClient() { } | 131 ~WebWidgetClient() { } |
| 127 }; | 132 }; |
| 128 | 133 |
| 129 } // namespace WebKit | 134 } // namespace WebKit |
| 130 | 135 |
| 131 #endif | 136 #endif |
| OLD | NEW |