| 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 // TestWebViewDelegate class: | 5 // TestWebViewDelegate class: | 
| 6 // This class implements the WebViewDelegate methods for the test shell.  One | 6 // This class implements the WebViewDelegate methods for the test shell.  One | 
| 7 // instance is owned by each TestShell. | 7 // instance is owned by each TestShell. | 
| 8 | 8 | 
| 9 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 9 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 
| 10 #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 10 #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 
| 11 | 11 | 
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" | 
| 13 | 13 | 
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) | 
| 15 #include <windows.h> | 15 #include <windows.h> | 
| 16 #endif | 16 #endif | 
| 17 #include <map> | 17 #include <map> | 
| 18 | 18 | 
| 19 #if defined(OS_LINUX) | 19 #if defined(OS_LINUX) | 
| 20 #include <gdk/gdkcursor.h> | 20 #include <gdk/gdkcursor.h> | 
| 21 #endif | 21 #endif | 
| 22 | 22 | 
| 23 #include "base/basictypes.h" | 23 #include "base/basictypes.h" | 
| 24 #include "base/ref_counted.h" | 24 #include "base/ref_counted.h" | 
|  | 25 #include "webkit/glue/webcursor.h" | 
| 25 #include "webkit/glue/webview_delegate.h" | 26 #include "webkit/glue/webview_delegate.h" | 
| 26 #include "webkit/glue/webwidget_delegate.h" | 27 #include "webkit/glue/webwidget_delegate.h" | 
| 27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) | 
| 28 #include "webkit/tools/test_shell/drag_delegate.h" | 29 #include "webkit/tools/test_shell/drag_delegate.h" | 
| 29 #include "webkit/tools/test_shell/drop_delegate.h" | 30 #include "webkit/tools/test_shell/drop_delegate.h" | 
| 30 #endif | 31 #endif | 
| 31 | 32 | 
| 32 struct WebPreferences; | 33 struct WebPreferences; | 
| 33 class GURL; | 34 class GURL; | 
| 34 class TestShell; | 35 class TestShell; | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 59       shell_(shell), | 60       shell_(shell), | 
| 60       top_loading_frame_(NULL), | 61       top_loading_frame_(NULL), | 
| 61       page_id_(-1), | 62       page_id_(-1), | 
| 62       last_page_id_updated_(-1), | 63       last_page_id_updated_(-1), | 
| 63       smart_insert_delete_enabled_(true) | 64       smart_insert_delete_enabled_(true) | 
| 64 #if defined(OS_WIN) | 65 #if defined(OS_WIN) | 
| 65       , select_trailing_whitespace_enabled_(true) | 66       , select_trailing_whitespace_enabled_(true) | 
| 66 #else | 67 #else | 
| 67       , select_trailing_whitespace_enabled_(false) | 68       , select_trailing_whitespace_enabled_(false) | 
| 68 #endif | 69 #endif | 
| 69 #if defined(OS_WIN) | 70 #if defined(OS_LINUX) | 
| 70       , custom_cursor_(NULL) |  | 
| 71 #elif defined(OS_LINUX) |  | 
| 72       , cursor_type_(GDK_X_CURSOR) | 71       , cursor_type_(GDK_X_CURSOR) | 
| 73 #endif | 72 #endif | 
| 74       { | 73       { | 
| 75   } | 74   } | 
| 76   virtual ~TestWebViewDelegate(); | 75   virtual ~TestWebViewDelegate(); | 
| 77 | 76 | 
| 78   // WebViewDelegate | 77   // WebViewDelegate | 
| 79   virtual WebView* CreateWebView(WebView* webview, bool user_gesture); | 78   virtual WebView* CreateWebView(WebView* webview, bool user_gesture); | 
| 80   virtual WebWidget* CreatePopupWidget(WebView* webview, bool focus_on_show); | 79   virtual WebWidget* CreatePopupWidget(WebView* webview, bool focus_on_show); | 
| 81   virtual WebPluginDelegate* CreatePluginDelegate( | 80   virtual WebPluginDelegate* CreatePluginDelegate( | 
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 303   typedef std::map<uint32, std::string> ResourceMap; | 302   typedef std::map<uint32, std::string> ResourceMap; | 
| 304   ResourceMap resource_identifier_map_; | 303   ResourceMap resource_identifier_map_; | 
| 305   std::string GetResourceDescription(uint32 identifier); | 304   std::string GetResourceDescription(uint32 identifier); | 
| 306 | 305 | 
| 307   // true if we want to enable smart insert/delete. | 306   // true if we want to enable smart insert/delete. | 
| 308   bool smart_insert_delete_enabled_; | 307   bool smart_insert_delete_enabled_; | 
| 309 | 308 | 
| 310   // true if we want to enable selection of trailing whitespaces | 309   // true if we want to enable selection of trailing whitespaces | 
| 311   bool select_trailing_whitespace_enabled_; | 310   bool select_trailing_whitespace_enabled_; | 
| 312 | 311 | 
|  | 312   WebCursor current_cursor_; | 
| 313 #if defined(OS_WIN) | 313 #if defined(OS_WIN) | 
| 314   HCURSOR custom_cursor_; |  | 
| 315 |  | 
| 316   // Classes needed by drag and drop. | 314   // Classes needed by drag and drop. | 
| 317   scoped_refptr<TestDragDelegate> drag_delegate_; | 315   scoped_refptr<TestDragDelegate> drag_delegate_; | 
| 318   scoped_refptr<TestDropDelegate> drop_delegate_; | 316   scoped_refptr<TestDropDelegate> drop_delegate_; | 
| 319 #endif | 317 #endif | 
| 320 | 318 | 
| 321 #if defined(OS_LINUX) | 319 #if defined(OS_LINUX) | 
| 322   // The type of cursor the window is currently using. | 320   // The type of cursor the window is currently using. | 
| 323   // Used for judging whether a new SetCursor call is actually changing the | 321   // Used for judging whether a new SetCursor call is actually changing the | 
| 324   // cursor. | 322   // cursor. | 
| 325   GdkCursorType cursor_type_; | 323   GdkCursorType cursor_type_; | 
| 326 #endif | 324 #endif | 
| 327 | 325 | 
| 328   CapturedContextMenuEvents captured_context_menu_events_; | 326   CapturedContextMenuEvents captured_context_menu_events_; | 
| 329 | 327 | 
| 330   DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate); | 328   DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate); | 
| 331 }; | 329 }; | 
| 332 | 330 | 
| 333 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 331 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 
| OLD | NEW | 
|---|