OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains the implementation of TestWebViewDelegate, which serves | 5 // This file contains the implementation of TestWebViewDelegate, which serves |
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to | 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to |
7 // have initialized a MessageLoop before these methods are called. | 7 // have initialized a MessageLoop before these methods are called. |
8 | 8 |
9 #include "webkit/tools/test_shell/test_webview_delegate.h" | 9 #include "webkit/tools/test_shell/test_webview_delegate.h" |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #include "webkit/glue/weburlrequest_extradata_impl.h" | 63 #include "webkit/glue/weburlrequest_extradata_impl.h" |
64 #include "webkit/glue/window_open_disposition.h" | 64 #include "webkit/glue/window_open_disposition.h" |
65 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 65 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
66 #include "webkit/media/webmediaplayer_impl.h" | 66 #include "webkit/media/webmediaplayer_impl.h" |
67 #include "webkit/plugins/npapi/webplugin_impl.h" | 67 #include "webkit/plugins/npapi/webplugin_impl.h" |
68 #include "webkit/plugins/npapi/plugin_list.h" | 68 #include "webkit/plugins/npapi/plugin_list.h" |
69 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 69 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
70 #include "webkit/tools/test_shell/mock_spellcheck.h" | 70 #include "webkit/tools/test_shell/mock_spellcheck.h" |
71 #include "webkit/tools/test_shell/notification_presenter.h" | 71 #include "webkit/tools/test_shell/notification_presenter.h" |
72 #include "webkit/tools/test_shell/simple_appcache_system.h" | 72 #include "webkit/tools/test_shell/simple_appcache_system.h" |
| 73 #include "webkit/tools/test_shell/simple_dom_storage_system.h" |
73 #include "webkit/tools/test_shell/simple_file_system.h" | 74 #include "webkit/tools/test_shell/simple_file_system.h" |
74 #include "webkit/tools/test_shell/test_navigation_controller.h" | 75 #include "webkit/tools/test_shell/test_navigation_controller.h" |
75 #include "webkit/tools/test_shell/test_shell.h" | 76 #include "webkit/tools/test_shell/test_shell.h" |
76 | 77 |
77 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
78 // TODO(port): make these files work everywhere. | 79 // TODO(port): make these files work everywhere. |
79 #include "webkit/tools/test_shell/drop_delegate.h" | 80 #include "webkit/tools/test_shell/drop_delegate.h" |
80 #endif | 81 #endif |
81 | 82 |
82 using appcache::WebApplicationCacheHostImpl; | 83 using appcache::WebApplicationCacheHostImpl; |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 } | 327 } |
327 | 328 |
328 WebWidget* TestWebViewDelegate::createPopupMenu(WebPopupType popup_type) { | 329 WebWidget* TestWebViewDelegate::createPopupMenu(WebPopupType popup_type) { |
329 // TODO(darin): Should we take into account |popup_type| (for activation | 330 // TODO(darin): Should we take into account |popup_type| (for activation |
330 // purpose)? | 331 // purpose)? |
331 return shell_->CreatePopupWidget(); | 332 return shell_->CreatePopupWidget(); |
332 } | 333 } |
333 | 334 |
334 WebStorageNamespace* TestWebViewDelegate::createSessionStorageNamespace( | 335 WebStorageNamespace* TestWebViewDelegate::createSessionStorageNamespace( |
335 unsigned quota) { | 336 unsigned quota) { |
| 337 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND |
| 338 return SimpleDomStorageSystem::instance().CreateSessionStorageNamespace(); |
| 339 #else |
336 // Enforce quota, ignoring the parameter from WebCore as in Chrome. | 340 // Enforce quota, ignoring the parameter from WebCore as in Chrome. |
337 return WebKit::WebStorageNamespace::createSessionStorageNamespace( | 341 return WebKit::WebStorageNamespace::createSessionStorageNamespace( |
338 WebStorageNamespace::m_sessionStorageQuota); | 342 WebStorageNamespace::m_sessionStorageQuota); |
| 343 #endif |
339 } | 344 } |
340 | 345 |
341 WebGraphicsContext3D* TestWebViewDelegate::createGraphicsContext3D( | 346 WebGraphicsContext3D* TestWebViewDelegate::createGraphicsContext3D( |
342 const WebGraphicsContext3D::Attributes& attributes, | 347 const WebGraphicsContext3D::Attributes& attributes, |
343 bool direct) { | 348 bool direct) { |
344 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( | 349 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( |
345 attributes, direct); | 350 attributes, direct); |
346 } | 351 } |
347 | 352 |
348 void TestWebViewDelegate::didAddMessageToConsole( | 353 void TestWebViewDelegate::didAddMessageToConsole( |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 } | 1150 } |
1146 | 1151 |
1147 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1152 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1148 fake_rect_ = rect; | 1153 fake_rect_ = rect; |
1149 using_fake_rect_ = true; | 1154 using_fake_rect_ = true; |
1150 } | 1155 } |
1151 | 1156 |
1152 WebRect TestWebViewDelegate::fake_window_rect() { | 1157 WebRect TestWebViewDelegate::fake_window_rect() { |
1153 return fake_rect_; | 1158 return fake_rect_; |
1154 } | 1159 } |
OLD | NEW |