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

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

Issue 1818: Bulk fixes to get Mac Test Shell more compile-happy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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.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
===================================================================
--- webkit/tools/test_shell/test_webview_delegate.h (revision 1852)
+++ webkit/tools/test_shell/test_webview_delegate.h (working copy)
@@ -6,18 +6,24 @@
// This class implements the WebViewDelegate methods for the test shell. One
// instance is owned by each TestShell.
-#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H__
-#define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H__
+#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
+#define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
+#include "build/build_config.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;
@@ -25,7 +31,8 @@
class WebDataSource;
class WebWidgetHost;
-class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, public WebViewDelegate {
+class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
+ public WebViewDelegate {
public:
struct CapturedContextMenuEvent {
CapturedContextMenuEvent(ContextNode::Type in_type,
@@ -49,8 +56,11 @@
page_id_(-1),
last_page_id_updated_(-1),
page_is_loading_(false),
- is_custom_policy_delegate_(false),
- custom_cursor_(NULL) {
+ is_custom_policy_delegate_(false)
+#if defined(OS_WIN)
+ , custom_cursor_(NULL)
+#endif
+ {
}
virtual ~TestWebViewDelegate();
@@ -182,7 +192,7 @@
virtual int GetHistoryForwardListCount();
// WebWidgetDelegate
- virtual HWND GetContainingWindow(WebWidget* webwidget);
+ virtual gfx::ViewHandle GetContainingWindow(WebWidget* webwidget);
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,18 @@
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)
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,16 +278,17 @@
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_;
+#endif
CapturedContextMenuEvents captured_context_menu_events_;
DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate);
};
-#endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H__
-
+#endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/webview_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698