| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 12 #include <map> |
| 13 #include <set> | 13 #include <set> |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> |
| 15 | 16 |
| 16 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
| 17 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 #include "webkit/tools/test_shell/drop_delegate.h" | 39 #include "webkit/tools/test_shell/drop_delegate.h" |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 #if defined(TOOLKIT_USES_GTK) | 42 #if defined(TOOLKIT_USES_GTK) |
| 42 #include <gdk/gdkcursor.h> | 43 #include <gdk/gdkcursor.h> |
| 43 #endif | 44 #endif |
| 44 | 45 |
| 45 struct WebPreferences; | 46 struct WebPreferences; |
| 46 class GURL; | 47 class GURL; |
| 47 class TestGeolocationService; | |
| 48 class TestShell; | 48 class TestShell; |
| 49 class WebWidgetHost; | 49 class WebWidgetHost; |
| 50 | 50 |
| 51 namespace WebKit { | 51 namespace WebKit { |
| 52 class WebDeviceOrientationClient; | 52 class WebDeviceOrientationClient; |
| 53 class WebSpeechInputController; | 53 class WebSpeechInputController; |
| 54 class WebSpeechInputListener; | 54 class WebSpeechInputListener; |
| 55 class WebStorageNamespace; | 55 class WebStorageNamespace; |
| 56 struct WebWindowFeatures; | 56 struct WebWindowFeatures; |
| 57 } | 57 } |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 virtual void CreatedPluginWindow( | 243 virtual void CreatedPluginWindow( |
| 244 gfx::PluginWindowHandle handle); | 244 gfx::PluginWindowHandle handle); |
| 245 virtual void WillDestroyPluginWindow( | 245 virtual void WillDestroyPluginWindow( |
| 246 gfx::PluginWindowHandle handle); | 246 gfx::PluginWindowHandle handle); |
| 247 virtual void DidMovePlugin( | 247 virtual void DidMovePlugin( |
| 248 const webkit::npapi::WebPluginGeometry& move); | 248 const webkit::npapi::WebPluginGeometry& move); |
| 249 virtual void DidStartLoadingForPlugin() {} | 249 virtual void DidStartLoadingForPlugin() {} |
| 250 virtual void DidStopLoadingForPlugin() {} | 250 virtual void DidStopLoadingForPlugin() {} |
| 251 virtual WebKit::WebCookieJar* GetCookieJar(); | 251 virtual WebKit::WebCookieJar* GetCookieJar(); |
| 252 | 252 |
| 253 TestWebViewDelegate(TestShell* shell); | 253 explicit TestWebViewDelegate(TestShell* shell); |
| 254 virtual ~TestWebViewDelegate(); | 254 virtual ~TestWebViewDelegate(); |
| 255 void Reset(); | 255 void Reset(); |
| 256 | 256 |
| 257 void SetSmartInsertDeleteEnabled(bool enabled); | 257 void SetSmartInsertDeleteEnabled(bool enabled); |
| 258 void SetSelectTrailingWhitespaceEnabled(bool enabled); | 258 void SetSelectTrailingWhitespaceEnabled(bool enabled); |
| 259 | 259 |
| 260 // Additional accessors | 260 // Additional accessors |
| 261 WebKit::WebFrame* top_loading_frame() { return top_loading_frame_; } | 261 WebKit::WebFrame* top_loading_frame() { return top_loading_frame_; } |
| 262 #if defined(OS_WIN) | 262 #if defined(OS_WIN) |
| 263 IDropTarget* drop_delegate() { return drop_delegate_.get(); } | 263 IDropTarget* drop_delegate() { return drop_delegate_.get(); } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 322 |
| 323 const WebKit::WebContextMenuData* last_context_menu_data() const { | 323 const WebKit::WebContextMenuData* last_context_menu_data() const { |
| 324 return last_context_menu_data_.get(); | 324 return last_context_menu_data_.get(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 MockSpellCheck* mock_spellcheck() { | 327 MockSpellCheck* mock_spellcheck() { |
| 328 return &mock_spellcheck_; | 328 return &mock_spellcheck_; |
| 329 } | 329 } |
| 330 | 330 |
| 331 private: | 331 private: |
| 332 | |
| 333 // Called the title of the page changes. | 332 // Called the title of the page changes. |
| 334 // Can be used to update the title of the window. | 333 // Can be used to update the title of the window. |
| 335 void SetPageTitle(const string16& title); | 334 void SetPageTitle(const string16& title); |
| 336 | 335 |
| 337 // Called when the URL of the page changes. | 336 // Called when the URL of the page changes. |
| 338 // Extracts the URL and forwards on to SetAddressBarURL(). | 337 // Extracts the URL and forwards on to SetAddressBarURL(). |
| 339 void UpdateAddressBar(WebKit::WebView* webView); | 338 void UpdateAddressBar(WebKit::WebView* webView); |
| 340 | 339 |
| 341 // Called when the URL of the page changes. | 340 // Called when the URL of the page changes. |
| 342 // Should be used to update the text of the URL bar. | 341 // Should be used to update the text of the URL bar. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 std::string edit_command_name_; | 444 std::string edit_command_name_; |
| 446 std::string edit_command_value_; | 445 std::string edit_command_value_; |
| 447 | 446 |
| 448 // The mock spellchecker used in TestWebViewDelegate::spellCheck(). | 447 // The mock spellchecker used in TestWebViewDelegate::spellCheck(). |
| 449 MockSpellCheck mock_spellcheck_; | 448 MockSpellCheck mock_spellcheck_; |
| 450 | 449 |
| 451 DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate); | 450 DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate); |
| 452 }; | 451 }; |
| 453 | 452 |
| 454 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ | 453 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ |
| OLD | NEW |