OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ | 5 #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ |
6 #define WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ | 6 #define WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ |
7 | 7 |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
9 #include "webkit/glue/window_open_disposition.h" | 9 #include "webkit/glue/window_open_disposition.h" |
10 | 10 |
11 namespace gfx { | 11 namespace gfx { |
12 class Point; | 12 class Point; |
13 class Rect; | 13 class Rect; |
14 } | 14 } |
15 | 15 |
16 class WebWidget; | 16 class WebWidget; |
17 class WebCursor; | 17 class WebCursor; |
18 struct WebPluginGeometry; | 18 struct WebPluginGeometry; |
19 | 19 |
20 class WebWidgetDelegate { | 20 class WebWidgetDelegate { |
21 public: | 21 public: |
22 // Returns the view in which the WebWidget is embedded. | 22 // Returns the view in which the WebWidget is embedded. |
23 virtual gfx::NativeView GetContainingWindow(WebWidget* webwidget) = 0; | 23 virtual gfx::NativeView GetContainingView(WebWidget* webwidget) = 0; |
24 | 24 |
25 // Called when a region of the WebWidget needs to be re-painted. | 25 // Called when a region of the WebWidget needs to be re-painted. |
26 virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect) =
0; | 26 virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect) =
0; |
27 | 27 |
28 // Called when a region of the WebWidget, given by clip_rect, should be | 28 // Called when a region of the WebWidget, given by clip_rect, should be |
29 // scrolled by the specified dx and dy amounts. | 29 // scrolled by the specified dx and dy amounts. |
30 virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy, | 30 virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy, |
31 const gfx::Rect& clip_rect) = 0; | 31 const gfx::Rect& clip_rect) = 0; |
32 | 32 |
33 // This method is called to instruct the window containing the WebWidget to | 33 // This method is called to instruct the window containing the WebWidget to |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 virtual bool IsHidden() = 0; | 88 virtual bool IsHidden() = 0; |
89 | 89 |
90 WebWidgetDelegate() { } | 90 WebWidgetDelegate() { } |
91 virtual ~WebWidgetDelegate() { } | 91 virtual ~WebWidgetDelegate() { } |
92 | 92 |
93 private: | 93 private: |
94 DISALLOW_EVIL_CONSTRUCTORS(WebWidgetDelegate); | 94 DISALLOW_EVIL_CONSTRUCTORS(WebWidgetDelegate); |
95 }; | 95 }; |
96 | 96 |
97 #endif // #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ | 97 #endif // #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ |
OLD | NEW |