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

Side by Side Diff: public/web/WebViewClient.h

Issue 191003006: Framework for converting embedder uses of WebFrame to WebLocalFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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 | « public/web/WebTestingSupport.h ('k') | public/web/mac/WebSubstringUtil.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define WebViewClient_h 32 #define WebViewClient_h
33 33
34 #include "../platform/WebColor.h" 34 #include "../platform/WebColor.h"
35 #include "../platform/WebGraphicsContext3D.h" 35 #include "../platform/WebGraphicsContext3D.h"
36 #include "../platform/WebString.h" 36 #include "../platform/WebString.h"
37 #include "WebAXEnums.h" 37 #include "WebAXEnums.h"
38 #include "WebContentDetectionResult.h" 38 #include "WebContentDetectionResult.h"
39 #include "WebDragOperation.h" 39 #include "WebDragOperation.h"
40 #include "WebFileChooserCompletion.h" 40 #include "WebFileChooserCompletion.h"
41 #include "WebFileChooserParams.h" 41 #include "WebFileChooserParams.h"
42 #include "WebFrame.h"
42 #include "WebNavigatorContentUtilsClient.h" 43 #include "WebNavigatorContentUtilsClient.h"
43 #include "WebPageVisibilityState.h" 44 #include "WebPageVisibilityState.h"
44 #include "WebPopupType.h" 45 #include "WebPopupType.h"
45 #include "WebTextAffinity.h" 46 #include "WebTextAffinity.h"
46 #include "WebTextDirection.h" 47 #include "WebTextDirection.h"
47 #include "WebWidgetClient.h" 48 #include "WebWidgetClient.h"
48 49
49 namespace blink { 50 namespace blink {
50 51
51 class WebAXObject; 52 class WebAXObject;
52 class WebColorChooser; 53 class WebColorChooser;
53 class WebColorChooserClient; 54 class WebColorChooserClient;
54 class WebCompositorOutputSurface; 55 class WebCompositorOutputSurface;
55 class WebDateTimeChooserCompletion; 56 class WebDateTimeChooserCompletion;
56 class WebDragData; 57 class WebDragData;
57 class WebElement; 58 class WebElement;
58 class WebExternalPopupMenu; 59 class WebExternalPopupMenu;
59 class WebExternalPopupMenuClient; 60 class WebExternalPopupMenuClient;
60 class WebFileChooserCompletion; 61 class WebFileChooserCompletion;
61 class WebFrame;
62 class WebGeolocationClient; 62 class WebGeolocationClient;
63 class WebGeolocationService; 63 class WebGeolocationService;
64 class WebGestureEvent; 64 class WebGestureEvent;
65 class WebHitTestResult; 65 class WebHitTestResult;
66 class WebImage; 66 class WebImage;
67 class WebInputElement; 67 class WebInputElement;
68 class WebKeyboardEvent; 68 class WebKeyboardEvent;
69 class WebMIDIClient; 69 class WebMIDIClient;
70 class WebNode; 70 class WebNode;
71 class WebNotificationPresenter; 71 class WebNotificationPresenter;
(...skipping 23 matching lines...) Expand all
95 public: 95 public:
96 // Factory methods ----------------------------------------------------- 96 // Factory methods -----------------------------------------------------
97 97
98 // Create a new related WebView. This method must clone its session storage 98 // Create a new related WebView. This method must clone its session storage
99 // so any subsequent calls to createSessionStorageNamespace conform to the 99 // so any subsequent calls to createSessionStorageNamespace conform to the
100 // WebStorage specification. 100 // WebStorage specification.
101 // The request parameter is only for the client to check if the request 101 // The request parameter is only for the client to check if the request
102 // could be fulfilled. The client should not load the request. 102 // could be fulfilled. The client should not load the request.
103 // The policy parameter indicates how the new view will be displayed in 103 // The policy parameter indicates how the new view will be displayed in
104 // WebWidgetClient::show. 104 // WebWidgetClient::show.
105 virtual WebView* createView(WebFrame* creator, 105 virtual WebView* createView(WebLocalFrame* creator,
106 const WebURLRequest& request, 106 const WebURLRequest& request,
107 const WebWindowFeatures& features, 107 const WebWindowFeatures& features,
108 const WebString& name, 108 const WebString& name,
109 WebNavigationPolicy policy, 109 WebNavigationPolicy policy,
110 bool suppressOpener) { 110 bool suppressOpener) {
111 return 0; 111 return 0;
112 } 112 }
113 113
114 // Create a new WebPopupMenu. In the second form, the client is 114 // Create a new WebPopupMenu. In the second form, the client is
115 // responsible for rendering the contents of the popup menu. 115 // responsible for rendering the contents of the popup menu.
(...skipping 12 matching lines...) Expand all
128 virtual bool shouldReportDetailedMessageForSource(const WebString& source) { return false; } 128 virtual bool shouldReportDetailedMessageForSource(const WebString& source) { return false; }
129 129
130 // A new message was added to the console. 130 // A new message was added to the console.
131 virtual void didAddMessageToConsole( 131 virtual void didAddMessageToConsole(
132 const WebConsoleMessage&, const WebString& sourceName, unsigned sourceLi ne, const WebString& stackTrace) { } 132 const WebConsoleMessage&, const WebString& sourceName, unsigned sourceLi ne, const WebString& stackTrace) { }
133 133
134 // Called when script in the page calls window.print(). If frame is 134 // Called when script in the page calls window.print(). If frame is
135 // non-null, then it selects a particular frame, including its 135 // non-null, then it selects a particular frame, including its
136 // children, to print. Otherwise, the main frame and its children 136 // children, to print. Otherwise, the main frame and its children
137 // should be printed. 137 // should be printed.
138 virtual void printPage(WebFrame*) { } 138 virtual void printPage(WebLocalFrame*) { }
139 139
140 // Called to retrieve the provider of desktop notifications. 140 // Called to retrieve the provider of desktop notifications.
141 virtual WebNotificationPresenter* notificationPresenter() { return 0; } 141 virtual WebNotificationPresenter* notificationPresenter() { return 0; }
142 142
143 // This method enumerates all the files in the path. It returns immediately 143 // This method enumerates all the files in the path. It returns immediately
144 // and asynchronously invokes the WebFileChooserCompletion with all the 144 // and asynchronously invokes the WebFileChooserCompletion with all the
145 // files in the directory. Returns false if the WebFileChooserCompletion 145 // files in the directory. Returns false if the WebFileChooserCompletion
146 // will never be called. 146 // will never be called.
147 virtual bool enumerateChosenDirectory(const WebString& path, WebFileChooserC ompletion*) { return false; } 147 virtual bool enumerateChosenDirectory(const WebString& path, WebFileChooserC ompletion*) { return false; }
148 148
149 // Navigational -------------------------------------------------------- 149 // Navigational --------------------------------------------------------
150 150
151 // These notifications bracket any loading that occurs in the WebView. 151 // These notifications bracket any loading that occurs in the WebView.
152 virtual void didStartLoading(bool toDifferentDocument) { } 152 virtual void didStartLoading(bool toDifferentDocument) { }
153 virtual void didStopLoading() { } 153 virtual void didStopLoading() { }
154 154
155 // Notification that some progress was made loading the current page. 155 // Notification that some progress was made loading the current page.
156 // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully 156 // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully
157 // loaded). 157 // loaded).
158 virtual void didChangeLoadProgress(WebFrame*, double loadProgress) { } 158 virtual void didChangeLoadProgress(WebLocalFrame*, double loadProgress) { }
159 159
160 // Editing ------------------------------------------------------------- 160 // Editing -------------------------------------------------------------
161 161
162 // These methods allow the client to intercept and overrule editing 162 // These methods allow the client to intercept and overrule editing
163 // operations. 163 // operations.
164 virtual void didCancelCompositionOnSelectionChange() { } 164 virtual void didCancelCompositionOnSelectionChange() { }
165 virtual void didChangeContents() { } 165 virtual void didChangeContents() { }
166 virtual void didExecuteCommand(const WebString& commandName) { } 166 virtual void didExecuteCommand(const WebString& commandName) { }
167 167
168 // This method is called in response to WebView's handleInputEvent() 168 // This method is called in response to WebView's handleInputEvent()
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // Hide notifation popup for form validation messages. 213 // Hide notifation popup for form validation messages.
214 virtual void hideValidationMessage() { } 214 virtual void hideValidationMessage() { }
215 215
216 // Move the existing notifation popup to the new anchor position. 216 // Move the existing notifation popup to the new anchor position.
217 virtual void moveValidationMessage(const WebRect& anchorInRootView) { } 217 virtual void moveValidationMessage(const WebRect& anchorInRootView) { }
218 218
219 // Displays a modal alert dialog containing the given message. Returns 219 // Displays a modal alert dialog containing the given message. Returns
220 // once the user dismisses the dialog. 220 // once the user dismisses the dialog.
221 virtual void runModalAlertDialog( 221 virtual void runModalAlertDialog(
222 WebFrame*, const WebString& message) { } 222 WebLocalFrame*, const WebString& message) { }
223 223
224 // Displays a modal confirmation dialog with the given message as 224 // Displays a modal confirmation dialog with the given message as
225 // description and OK/Cancel choices. Returns true if the user selects 225 // description and OK/Cancel choices. Returns true if the user selects
226 // 'OK' or false otherwise. 226 // 'OK' or false otherwise.
227 virtual bool runModalConfirmDialog( 227 virtual bool runModalConfirmDialog(
228 WebFrame*, const WebString& message) { return false; } 228 WebLocalFrame*, const WebString& message) { return false; }
229 229
230 // Displays a modal input dialog with the given message as description 230 // Displays a modal input dialog with the given message as description
231 // and OK/Cancel choices. The input field is pre-filled with 231 // and OK/Cancel choices. The input field is pre-filled with
232 // defaultValue. Returns true if the user selects 'OK' or false 232 // defaultValue. Returns true if the user selects 'OK' or false
233 // otherwise. Upon returning true, actualValue contains the value of 233 // otherwise. Upon returning true, actualValue contains the value of
234 // the input field. 234 // the input field.
235 virtual bool runModalPromptDialog( 235 virtual bool runModalPromptDialog(
236 WebFrame*, const WebString& message, const WebString& defaultValue, 236 WebLocalFrame*, const WebString& message, const WebString& defaultValue,
237 WebString* actualValue) { return false; } 237 WebString* actualValue) { return false; }
238 238
239 // Displays a modal confirmation dialog containing the given message as 239 // Displays a modal confirmation dialog containing the given message as
240 // description and OK/Cancel choices, where 'OK' means that it is okay 240 // description and OK/Cancel choices, where 'OK' means that it is okay
241 // to proceed with closing the view. Returns true if the user selects 241 // to proceed with closing the view. Returns true if the user selects
242 // 'OK' or false otherwise. 242 // 'OK' or false otherwise.
243 virtual bool runModalBeforeUnloadDialog( 243 virtual bool runModalBeforeUnloadDialog(
244 WebFrame*, const WebString& message) { return true; } 244 WebLocalFrame*, const WebString& message) { return true; }
245 245
246 246
247 // UI ------------------------------------------------------------------ 247 // UI ------------------------------------------------------------------
248 248
249 // Called when script modifies window.status 249 // Called when script modifies window.status
250 virtual void setStatusText(const WebString&) { } 250 virtual void setStatusText(const WebString&) { }
251 251
252 // Called when hovering over an anchor with the given URL. 252 // Called when hovering over an anchor with the given URL.
253 virtual void setMouseOverURL(const WebURL&) { } 253 virtual void setMouseOverURL(const WebURL&) { }
254 254
255 // Called when keyboard focus switches to an anchor with the given URL. 255 // Called when keyboard focus switches to an anchor with the given URL.
256 virtual void setKeyboardFocusURL(const WebURL&) { } 256 virtual void setKeyboardFocusURL(const WebURL&) { }
257 257
258 // Called when a drag-n-drop operation should begin. 258 // Called when a drag-n-drop operation should begin.
259 virtual void startDragging(WebFrame*, const WebDragData&, WebDragOperationsM ask, const WebImage&, const WebPoint& dragImageOffset) { } 259 virtual void startDragging(WebLocalFrame*, const WebDragData&, WebDragOperat ionsMask, const WebImage&, const WebPoint& dragImageOffset) { }
260 260
261 // Called to determine if drag-n-drop operations may initiate a page 261 // Called to determine if drag-n-drop operations may initiate a page
262 // navigation. 262 // navigation.
263 virtual bool acceptsLoadDrops() { return true; } 263 virtual bool acceptsLoadDrops() { return true; }
264 264
265 // Take focus away from the WebView by focusing an adjacent UI element 265 // Take focus away from the WebView by focusing an adjacent UI element
266 // in the containing window. 266 // in the containing window.
267 virtual void focusNext() { } 267 virtual void focusNext() { }
268 virtual void focusPrevious() { } 268 virtual void focusPrevious() { }
269 269
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Informs the browser that the draggable regions have been updated. 408 // Informs the browser that the draggable regions have been updated.
409 virtual void draggableRegionsChanged() { } 409 virtual void draggableRegionsChanged() { }
410 410
411 protected: 411 protected:
412 ~WebViewClient() { } 412 ~WebViewClient() { }
413 }; 413 };
414 414
415 } // namespace blink 415 } // namespace blink
416 416
417 #endif 417 #endif
OLDNEW
« no previous file with comments | « public/web/WebTestingSupport.h ('k') | public/web/mac/WebSubstringUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698