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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Called when the cursor for the widget changes. | 82 // Called when the cursor for the widget changes. |
83 virtual void didChangeCursor(const WebCursorInfo&) {} | 83 virtual void didChangeCursor(const WebCursorInfo&) {} |
84 | 84 |
85 // Called when the widget should be closed. WebWidget::close() should | 85 // Called when the widget should be closed. WebWidget::close() should |
86 // be called asynchronously as a result of this notification. | 86 // be called asynchronously as a result of this notification. |
87 virtual void closeWidgetSoon() {} | 87 virtual void closeWidgetSoon() {} |
88 | 88 |
89 // Called to show the widget according to the given policy. | 89 // Called to show the widget according to the given policy. |
90 virtual void show(WebNavigationPolicy) {} | 90 virtual void show(WebNavigationPolicy) {} |
91 | 91 |
92 // Called to get/set the position of the widget in screen coordinates. | 92 // Called to get/set the position of the widget's window in screen |
| 93 // coordinates. Note, the window includes any decorations such as borders, |
| 94 // scrollbars, URL bar, tab strip, etc. if they exist. |
93 virtual WebRect windowRect() { return WebRect(); } | 95 virtual WebRect windowRect() { return WebRect(); } |
94 virtual void setWindowRect(const WebRect&) {} | 96 virtual void setWindowRect(const WebRect&) {} |
95 | 97 |
| 98 // Called to get the view rect in screen coordinates. This is the actual |
| 99 // content view area, i.e. doesn't include any window decorations. |
| 100 virtual WebRect viewRect() { return WebRect(); } |
| 101 |
96 // Called when a tooltip should be shown at the current cursor position. | 102 // Called when a tooltip should be shown at the current cursor position. |
97 virtual void setToolTipText(const WebString&, WebTextDirection hint) {} | 103 virtual void setToolTipText(const WebString&, WebTextDirection hint) {} |
98 | 104 |
99 // Called to get the position of the resizer rect in window coordinates. | 105 // Called to get the position of the resizer rect in window coordinates. |
100 virtual WebRect windowResizerRect() { return WebRect(); } | 106 virtual WebRect windowResizerRect() { return WebRect(); } |
101 | 107 |
102 // Called to query information about the screen where this widget is | 108 // Called to query information about the screen where this widget is |
103 // displayed. | 109 // displayed. |
104 virtual WebScreenInfo screenInfo() { return WebScreenInfo(); } | 110 virtual WebScreenInfo screenInfo() { return WebScreenInfo(); } |
105 | 111 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // migration is completed. | 184 // migration is completed. |
179 virtual void convertWindowToViewport(WebFloatRect* rect) {} | 185 virtual void convertWindowToViewport(WebFloatRect* rect) {} |
180 | 186 |
181 protected: | 187 protected: |
182 ~WebWidgetClient() {} | 188 ~WebWidgetClient() {} |
183 }; | 189 }; |
184 | 190 |
185 } // namespace blink | 191 } // namespace blink |
186 | 192 |
187 #endif | 193 #endif |
OLD | NEW |