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

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

Issue 16510: Fixes bug 1925 (context menus for text selections in... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 struct WebPreferences; 33 struct WebPreferences;
34 class GURL; 34 class GURL;
35 class TestShell; 35 class TestShell;
36 class WebDataSource; 36 class WebDataSource;
37 class WebWidgetHost; 37 class WebWidgetHost;
38 38
39 class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, 39 class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
40 public WebViewDelegate { 40 public WebViewDelegate {
41 public: 41 public:
42 struct CapturedContextMenuEvent { 42 struct CapturedContextMenuEvent {
43 CapturedContextMenuEvent(ContextNode::Type in_type, 43 CapturedContextMenuEvent(ContextNode in_node,
44 int in_x, 44 int in_x,
45 int in_y) 45 int in_y)
46 : type(in_type), 46 : node(in_node),
47 x(in_x), 47 x(in_x),
48 y(in_y) { 48 y(in_y) {
49 } 49 }
50 50
51 ContextNode::Type type; 51 ContextNode node;
52 int x; 52 int x;
53 int y; 53 int y;
54 }; 54 };
55 55
56 typedef std::vector<CapturedContextMenuEvent> CapturedContextMenuEvents; 56 typedef std::vector<CapturedContextMenuEvent> CapturedContextMenuEvents;
57 57
58 TestWebViewDelegate(TestShell* shell) 58 TestWebViewDelegate(TestShell* shell)
59 : is_custom_policy_delegate_(false), 59 : is_custom_policy_delegate_(false),
60 shell_(shell), 60 shell_(shell),
61 top_loading_frame_(NULL), 61 top_loading_frame_(NULL),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const std::wstring& message, 95 const std::wstring& message,
96 const std::wstring& default_value, 96 const std::wstring& default_value,
97 std::wstring* result); 97 std::wstring* result);
98 virtual void AddMessageToConsole(WebView* webview, 98 virtual void AddMessageToConsole(WebView* webview,
99 const std::wstring& message, 99 const std::wstring& message,
100 unsigned int line_no, 100 unsigned int line_no,
101 const std::wstring& source_id); 101 const std::wstring& source_id);
102 virtual void StartDragging(WebView* webview, 102 virtual void StartDragging(WebView* webview,
103 const WebDropData& drop_data); 103 const WebDropData& drop_data);
104 virtual void ShowContextMenu(WebView* webview, 104 virtual void ShowContextMenu(WebView* webview,
105 ContextNode::Type type, 105 ContextNode node,
106 int x, 106 int x,
107 int y, 107 int y,
108 const GURL& link_url, 108 const GURL& link_url,
109 const GURL& image_url, 109 const GURL& image_url,
110 const GURL& page_url, 110 const GURL& page_url,
111 const GURL& frame_url, 111 const GURL& frame_url,
112 const std::wstring& selection_text, 112 const std::wstring& selection_text,
113 const std::wstring& misspelled_word, 113 const std::wstring& misspelled_word,
114 int edit_flags, 114 int edit_flags,
115 const std::string& security_info); 115 const std::string& security_info);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // cursor. 322 // cursor.
323 GdkCursorType cursor_type_; 323 GdkCursorType cursor_type_;
324 #endif 324 #endif
325 325
326 CapturedContextMenuEvents captured_context_menu_events_; 326 CapturedContextMenuEvents captured_context_menu_events_;
327 327
328 DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate); 328 DISALLOW_EVIL_CONSTRUCTORS(TestWebViewDelegate);
329 }; 329 };
330 330
331 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ 331 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698