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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.h

Issue 9735: test_webview_delegate.cc was forked for the Mac test shell, and then (Closed)
Patch Set: Created 12 years, 1 month 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 unified diff | Download patch
OLDNEW
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_
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 // Methods for modifying WebPreferences 231 // Methods for modifying WebPreferences
232 void SetUserStyleSheetEnabled(bool is_enabled); 232 void SetUserStyleSheetEnabled(bool is_enabled);
233 void SetUserStyleSheetLocation(const GURL& location); 233 void SetUserStyleSheetLocation(const GURL& location);
234 234
235 // Sets the webview as a drop target. 235 // Sets the webview as a drop target.
236 void RegisterDragDrop(); 236 void RegisterDragDrop();
237 237
238 protected: 238 protected:
239 // Called the title of the page changes.
240 // Can be used to update the title of the window.
241 void SetPageTitle(const std::wstring& title);
242
243 // Called when the URL of the page changes.
244 // Extracts the URL and forwards on to SetAddressBarURL().
239 void UpdateAddressBar(WebView* webView); 245 void UpdateAddressBar(WebView* webView);
240 246
247 // Called when the URL of the page changes.
248 // Should be used to update the text of the URL bar.
249 void SetAddressBarURL(const GURL& url);
250
251 // Show a JavaScript alert as a popup message.
252 // The caller should test whether we're in interactive mode and only
253 // call this function when we really want a message to pop up.
254 void ShowJavaScriptAlert(const std::wstring& message);
255
241 // In the Mac code, this is called to trigger the end of a test after the 256 // In the Mac code, this is called to trigger the end of a test after the
242 // page has finished loading. From here, we can generate the dump for the 257 // page has finished loading. From here, we can generate the dump for the
243 // test. 258 // test.
244 void LocationChangeDone(WebDataSource* data_source); 259 void LocationChangeDone(WebDataSource* data_source);
245 260
246 WebWidgetHost* GetHostForWidget(WebWidget* webwidget); 261 WebWidgetHost* GetHostForWidget(WebWidget* webwidget);
247 262
248 void UpdateForCommittedLoad(WebFrame* webframe, bool is_new_navigation); 263 void UpdateForCommittedLoad(WebFrame* webframe, bool is_new_navigation);
249 void UpdateURL(WebFrame* frame); 264 void UpdateURL(WebFrame* frame);
250 void UpdateSessionHistory(WebFrame* frame); 265 void UpdateSessionHistory(WebFrame* frame);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 scoped_refptr<TestDragDelegate> drag_delegate_; 300 scoped_refptr<TestDragDelegate> drag_delegate_;
286 scoped_refptr<TestDropDelegate> drop_delegate_; 301 scoped_refptr<TestDropDelegate> drop_delegate_;
287 #endif 302 #endif
288 303
289 CapturedContextMenuEvents captured_context_menu_events_; 304 CapturedContextMenuEvents captured_context_menu_events_;
290 305
291 DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate); 306 DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate);
292 }; 307 };
293 308
294 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ 309 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698