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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.h

Issue 1606: hodgepodge for test_shell.cc (Closed)
Patch Set: update some comments Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_shell_win.h ('k') | webkit/tools/test_shell/webview_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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__
-
« no previous file with comments | « webkit/tools/test_shell/test_shell_win.h ('k') | webkit/tools/test_shell/webview_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698