| Index: webkit/tools/test_shell/test_webview_delegate.h
|
| diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
|
| index c42567a7e0acf588b09498fd478da0d046f09d23..45bbe954f1b013597a1a1bf3b982e0df85994851 100644
|
| --- a/webkit/tools/test_shell/test_webview_delegate.h
|
| +++ b/webkit/tools/test_shell/test_webview_delegate.h
|
| @@ -9,15 +9,21 @@
|
| #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H__
|
| #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H__
|
|
|
| +#if defined(OS_WIN)
|
| #include <windows.h>
|
| +#endif
|
| +
|
| #include <map>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/ref_counted.h"
|
| #include "webkit/glue/webview_delegate.h"
|
| #include "webkit/glue/webwidget_delegate.h"
|
| +
|
| +#if defined(OS_WIN)
|
| #include "webkit/tools/test_shell/drag_delegate.h"
|
| #include "webkit/tools/test_shell/drop_delegate.h"
|
| +#endif
|
|
|
| struct WebPreferences;
|
| class GURL;
|
| @@ -44,12 +50,12 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, public
|
| typedef std::vector<CapturedContextMenuEvent> CapturedContextMenuEvents;
|
|
|
| TestWebViewDelegate(TestShell* shell)
|
| - : shell_(shell),
|
| + : page_is_loading_(false),
|
| + is_custom_policy_delegate_(false),
|
| + shell_(shell),
|
| top_loading_frame_(NULL),
|
| page_id_(-1),
|
| last_page_id_updated_(-1),
|
| - page_is_loading_(false),
|
| - is_custom_policy_delegate_(false),
|
| custom_cursor_(NULL) {
|
| }
|
| virtual ~TestWebViewDelegate();
|
| @@ -175,14 +181,18 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, public
|
| WebNavigationType type,
|
| WindowOpenDisposition disposition,
|
| bool is_redirect);
|
| - void TestWebViewDelegate::SetCustomPolicyDelegate(bool isCustom);
|
| + void SetCustomPolicyDelegate(bool isCustom);
|
| virtual WebHistoryItem* GetHistoryEntryAtOffset(int offset);
|
| virtual void GoToEntryAtOffsetAsync(int offset);
|
| virtual int GetHistoryBackListCount();
|
| virtual int GetHistoryForwardListCount();
|
|
|
| // WebWidgetDelegate
|
| +#if defined(OS_WIN)
|
| virtual HWND GetContainingWindow(WebWidget* webwidget);
|
| +#else
|
| + virtual void* GetContainingWindow(WebWidget* webwidget) { return NULL; }
|
| +#endif
|
| virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect);
|
| virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy,
|
| const gfx::Rect& clip_rect);
|
| @@ -198,16 +208,19 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, public
|
| virtual void DidMove(WebWidget* webwidget, const WebPluginGeometry& move);
|
| virtual void RunModal(WebWidget* webwidget);
|
| virtual void AddRef() {
|
| - RefCounted<TestWebViewDelegate>::AddRef();
|
| + base::RefCounted<TestWebViewDelegate>::AddRef();
|
| }
|
| virtual void Release() {
|
| - RefCounted<TestWebViewDelegate>::Release();
|
| + base::RefCounted<TestWebViewDelegate>::Release();
|
| }
|
|
|
| // Additional accessors
|
| WebFrame* top_loading_frame() { return top_loading_frame_; }
|
| +#if defined(OS_WIN)
|
| + // TODO(evanm): restore these once we have drag'n'drop ported.
|
| IDropTarget* drop_delegate() { return drop_delegate_.get(); }
|
| IDropSource* drag_delegate() { return drag_delegate_.get(); }
|
| +#endif
|
| const CapturedContextMenuEvents& captured_context_menu_events() const {
|
| return captured_context_menu_events_;
|
| }
|
| @@ -266,11 +279,15 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, public
|
| ResourceMap resource_identifier_map_;
|
| std::string GetResourceDescription(uint32 identifier);
|
|
|
| +#if defined(OS_WIN)
|
| HCURSOR custom_cursor_;
|
|
|
| // Classes needed by drag and drop.
|
| scoped_refptr<TestDragDelegate> drag_delegate_;
|
| scoped_refptr<TestDropDelegate> drop_delegate_;
|
| +#else
|
| + void* custom_cursor_; // TODO(port): currently unused.
|
| +#endif
|
|
|
| CapturedContextMenuEvents captured_context_menu_events_;
|
|
|
| @@ -278,4 +295,3 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, public
|
| };
|
|
|
| #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H__
|
| -
|
|
|