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

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

Issue 155954: Implement sending actions back to the render for media element context menus. (Closed)
Patch Set: remove uneeded bits. Created 11 years, 5 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
« no previous file with comments | « webkit/glue/webview_impl.cc ('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 27 matching lines...) Expand all
38 struct ContextMenuMediaParams; 38 struct ContextMenuMediaParams;
39 struct WebPreferences; 39 struct WebPreferences;
40 class GURL; 40 class GURL;
41 class TestShell; 41 class TestShell;
42 class WebWidgetHost; 42 class WebWidgetHost;
43 43
44 class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, 44 class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
45 public WebViewDelegate { 45 public WebViewDelegate {
46 public: 46 public:
47 struct CapturedContextMenuEvent { 47 struct CapturedContextMenuEvent {
48 CapturedContextMenuEvent(ContextNode in_node, 48 CapturedContextMenuEvent(ContextNodeType in_node_type,
49 int in_x, 49 int in_x,
50 int in_y) 50 int in_y)
51 : node(in_node), 51 : node_type(in_node_type),
52 x(in_x), 52 x(in_x),
53 y(in_y) { 53 y(in_y) {
54 } 54 }
55 55
56 ContextNode node; 56 ContextNodeType node_type;
57 int x; 57 int x;
58 int y; 58 int y;
59 }; 59 };
60 60
61 typedef std::vector<CapturedContextMenuEvent> CapturedContextMenuEvents; 61 typedef std::vector<CapturedContextMenuEvent> CapturedContextMenuEvents;
62 62
63 TestWebViewDelegate(TestShell* shell) 63 TestWebViewDelegate(TestShell* shell)
64 : policy_delegate_enabled_(false), 64 : policy_delegate_enabled_(false),
65 policy_delegate_is_permissive_(false), 65 policy_delegate_is_permissive_(false),
66 policy_delegate_should_notify_done_(false), 66 policy_delegate_should_notify_done_(false),
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 virtual void SetStatusbarText(WebView* webview, 123 virtual void SetStatusbarText(WebView* webview,
124 const std::wstring& message); 124 const std::wstring& message);
125 125
126 virtual void AddMessageToConsole(WebView* webview, 126 virtual void AddMessageToConsole(WebView* webview,
127 const std::wstring& message, 127 const std::wstring& message,
128 unsigned int line_no, 128 unsigned int line_no,
129 const std::wstring& source_id); 129 const std::wstring& source_id);
130 virtual void StartDragging(WebView* webview, 130 virtual void StartDragging(WebView* webview,
131 const WebKit::WebDragData& drag_data); 131 const WebKit::WebDragData& drag_data);
132 virtual void ShowContextMenu(WebView* webview, 132 virtual void ShowContextMenu(WebView* webview,
133 ContextNode node, 133 ContextNodeType node_type,
134 int x, 134 int x,
135 int y, 135 int y,
136 const GURL& link_url, 136 const GURL& link_url,
137 const GURL& image_url, 137 const GURL& image_url,
138 const GURL& page_url, 138 const GURL& page_url,
139 const GURL& frame_url, 139 const GURL& frame_url,
140 const ContextMenuMediaParams& media_params, 140 const ContextMenuMediaParams& media_params,
141 const std::wstring& selection_text, 141 const std::wstring& selection_text,
142 const std::wstring& misspelled_word, 142 const std::wstring& misspelled_word,
143 int edit_flags, 143 int edit_flags,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 #if defined(OS_MACOSX) 369 #if defined(OS_MACOSX)
370 scoped_ptr<WebKit::WebPopupMenuInfo> popup_menu_info_; 370 scoped_ptr<WebKit::WebPopupMenuInfo> popup_menu_info_;
371 WebKit::WebRect popup_bounds_; 371 WebKit::WebRect popup_bounds_;
372 #endif 372 #endif
373 373
374 DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate); 374 DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate);
375 }; 375 };
376 376
377 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ 377 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/glue/webview_impl.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698