Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Side by Side Diff: webkit/api/public/WebWidgetClient.h

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/api/public/WebWidget.h ('k') | webkit/glue/chrome_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 * copyright notice, this list of conditions and the following disclaimer 11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the 12 * in the documentation and/or other materials provided with the
13 * distribution. 13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its 14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from 15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission. 16 * this software without specific prior written permission.
17 * 17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebWidgetClient_h 31 #ifndef WebWidgetClient_h
32 #define WebWidgetClient_h 32 #define WebWidgetClient_h
33 33
34 #error "This header file is still a work in progress; do not include!"
35
36 #include "WebCommon.h" 34 #include "WebCommon.h"
37 #include "WebNavigationPolicy.h" 35 #include "WebNavigationPolicy.h"
38 36
39 namespace WebKit { 37 namespace WebKit {
40 class WebWidget; 38 class WebWidget;
41 struct WebCursorInfo; 39 struct WebCursorInfo;
42 struct WebPluginGeometry;
43 struct WebRect; 40 struct WebRect;
44 struct WebScreenInfo; 41 struct WebScreenInfo;
45 42
46 class WebWidgetClient { 43 class WebWidgetClient {
47 public: 44 public:
48 // Called when a region of the WebWidget needs to be re-painted. 45 // Called when a region of the WebWidget needs to be re-painted.
49 virtual void didInvalidateRect(WebWidget*, const WebRect&) = 0; 46 virtual void didInvalidateRect(const WebRect&) = 0;
50 47
51 // Called when a region of the WebWidget, given by clipRect, should be 48 // Called when a region of the WebWidget, given by clipRect, should be
52 // scrolled by the specified dx and dy amounts. 49 // scrolled by the specified dx and dy amounts.
53 virtual void didScrollRect(WebWidget*, int dx, int dy, const WebRect& clipRect) = 0; 50 virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) = 0;
54
55 // Called when a plugin is moved relative to its containing window.
56 // This typically happens as a result of scrolling the page.
57 virtual void didMovePlugin(WebWidget*, const WebPluginGeometry&) = 0;
58 51
59 // Called when the widget acquires or loses focus, respectively. 52 // Called when the widget acquires or loses focus, respectively.
60 virtual void didFocus(WebWidget*) = 0; 53 virtual void didFocus() = 0;
61 virtual void didBlur(WebWidget*) = 0; 54 virtual void didBlur() = 0;
62 55
63 // Called when the cursor for the widget changes. 56 // Called when the cursor for the widget changes.
64 virtual void didChangeCursor(WebWidget*, const WebCursorInfo&) = 0; 57 virtual void didChangeCursor(const WebCursorInfo&) = 0;
65 58
66 // Called when the widget should be closed. WebWidget::close() should 59 // Called when the widget should be closed. WebWidget::close() should
67 // be called asynchronously as a result of this notification. 60 // be called asynchronously as a result of this notification.
68 virtual void closeWidgetSoon(WebWidget*) = 0; 61 virtual void closeWidgetSoon() = 0;
69 62
70 // Called to show the widget according to the given policy. 63 // Called to show the widget according to the given policy.
71 virtual void show(WebWidget*, WebNavigationPolicy) = 0; 64 virtual void show(WebNavigationPolicy) = 0;
72 65
73 // Called to block execution of the current thread until the widget is 66 // Called to block execution of the current thread until the widget is
74 // closed. 67 // closed.
75 virtual void runModal(WebWidget*) = 0; 68 virtual void runModal() = 0;
76 69
77 // Called to get/set the position of the widget in screen coordinates. 70 // Called to get/set the position of the widget in screen coordinates.
78 virtual WebRect windowRect(WebWidget*) = 0; 71 virtual WebRect windowRect() = 0;
79 virtual void setWindowRect(WebWidget*, const WebRect&) = 0; 72 virtual void setWindowRect(const WebRect&) = 0;
80 73
81 // Called to get the position of the resizer rect in window coordinates. 74 // Called to get the position of the resizer rect in window coordinates.
82 virtual WebRect windowResizerRect(WebWidget*) = 0; 75 virtual WebRect windowResizerRect() = 0;
83 76
84 // Called to get the position of the root window containing the widget 77 // Called to get the position of the root window containing the widget
85 // in screen coordinates. 78 // in screen coordinates.
86 virtual WebRect rootWindowRect(WebWidget*) = 0; 79 virtual WebRect rootWindowRect() = 0;
87 80
88 // Called to query information about the screen where this widget is 81 // Called to query information about the screen where this widget is
89 // displayed. 82 // displayed.
90 virtual WebScreenInfo screenInfo(WebWidget*) = 0; 83 virtual WebScreenInfo screenInfo() = 0;
91 }; 84 };
92 85
93 } // namespace WebKit 86 } // namespace WebKit
94 87
95 #endif 88 #endif
OLDNEW
« no previous file with comments | « webkit/api/public/WebWidget.h ('k') | webkit/glue/chrome_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698