OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 class WebURLResponse; | 88 class WebURLResponse; |
89 class WebUserMediaClient; | 89 class WebUserMediaClient; |
90 class WebVRClient; | 90 class WebVRClient; |
91 class WebWorkerContentSettingsClientProxy; | 91 class WebWorkerContentSettingsClientProxy; |
92 struct WebColorSuggestion; | 92 struct WebColorSuggestion; |
93 struct WebConsoleMessage; | 93 struct WebConsoleMessage; |
94 struct WebContextMenuData; | 94 struct WebContextMenuData; |
95 struct WebPluginParams; | 95 struct WebPluginParams; |
96 struct WebPopupMenuInfo; | 96 struct WebPopupMenuInfo; |
97 struct WebRect; | 97 struct WebRect; |
98 struct WebTransitionElementData; | |
99 struct WebURLError; | 98 struct WebURLError; |
100 | 99 |
101 class WebFrameClient { | 100 class WebFrameClient { |
102 public: | 101 public: |
103 // Factory methods ----------------------------------------------------- | 102 // Factory methods ----------------------------------------------------- |
104 | 103 |
105 // May return null. | 104 // May return null. |
106 virtual WebPluginPlaceholder* createPluginPlaceholder(WebLocalFrame*, const
WebPluginParams&) { return 0; } | 105 virtual WebPluginPlaceholder* createPluginPlaceholder(WebLocalFrame*, const
WebPluginParams&) { return 0; } |
107 | 106 |
108 // May return null. | 107 // May return null. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 204 |
206 // Note: if browser side navigations are enabled, the client may modify | 205 // Note: if browser side navigations are enabled, the client may modify |
207 // the urlRequest. However, should this happen, the client should change | 206 // the urlRequest. However, should this happen, the client should change |
208 // the WebNavigationPolicy to WebNavigationPolicyIgnore, and the load | 207 // the WebNavigationPolicy to WebNavigationPolicyIgnore, and the load |
209 // should stop in blink. In all other cases, the urlRequest should not | 208 // should stop in blink. In all other cases, the urlRequest should not |
210 // be modified. | 209 // be modified. |
211 WebURLRequest& urlRequest; | 210 WebURLRequest& urlRequest; |
212 WebNavigationType navigationType; | 211 WebNavigationType navigationType; |
213 WebNavigationPolicy defaultPolicy; | 212 WebNavigationPolicy defaultPolicy; |
214 bool isRedirect; | 213 bool isRedirect; |
215 bool isTransitionNavigation; | |
216 | 214 |
217 NavigationPolicyInfo(WebURLRequest& urlRequest) | 215 NavigationPolicyInfo(WebURLRequest& urlRequest) |
218 : frame(0) | 216 : frame(0) |
219 , extraData(0) | 217 , extraData(0) |
220 , urlRequest(urlRequest) | 218 , urlRequest(urlRequest) |
221 , navigationType(WebNavigationTypeOther) | 219 , navigationType(WebNavigationTypeOther) |
222 , defaultPolicy(WebNavigationPolicyIgnore) | 220 , defaultPolicy(WebNavigationPolicyIgnore) |
223 , isRedirect(false) | 221 , isRedirect(false) { } |
224 , isTransitionNavigation(false) { } | |
225 }; | 222 }; |
226 | 223 |
227 virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicy
Info& info) | 224 virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicy
Info& info) |
228 { | 225 { |
229 return decidePolicyForNavigation(info.frame, info.extraData, info.urlReq
uest, info.navigationType, info.defaultPolicy, info.isRedirect); | 226 return decidePolicyForNavigation(info.frame, info.extraData, info.urlReq
uest, info.navigationType, info.defaultPolicy, info.isRedirect); |
230 } | 227 } |
231 | 228 |
232 // DEPRECATED | 229 // DEPRECATED |
233 virtual WebNavigationPolicy decidePolicyForNavigation( | 230 virtual WebNavigationPolicy decidePolicyForNavigation( |
234 WebLocalFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavi
gationType, | 231 WebLocalFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavi
gationType, |
(...skipping 20 matching lines...) Expand all Loading... |
255 virtual void willSendSubmitEvent(WebLocalFrame*, const WebFormElement&) { } | 252 virtual void willSendSubmitEvent(WebLocalFrame*, const WebFormElement&) { } |
256 | 253 |
257 // A form submission is about to occur. | 254 // A form submission is about to occur. |
258 virtual void willSubmitForm(WebLocalFrame*, const WebFormElement&) { } | 255 virtual void willSubmitForm(WebLocalFrame*, const WebFormElement&) { } |
259 | 256 |
260 // A datasource has been created for a new navigation. The given | 257 // A datasource has been created for a new navigation. The given |
261 // datasource will become the provisional datasource for the frame. | 258 // datasource will become the provisional datasource for the frame. |
262 virtual void didCreateDataSource(WebLocalFrame*, WebDataSource*) { } | 259 virtual void didCreateDataSource(WebLocalFrame*, WebDataSource*) { } |
263 | 260 |
264 // A new provisional load has been started. | 261 // A new provisional load has been started. |
265 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans
itionNavigation, | 262 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, double trigg
eringEventTime) { } |
266 double triggeringEventTime) { } | |
267 | 263 |
268 // The provisional load was redirected via a HTTP 3xx response. | 264 // The provisional load was redirected via a HTTP 3xx response. |
269 virtual void didReceiveServerRedirectForProvisionalLoad(WebLocalFrame*) { } | 265 virtual void didReceiveServerRedirectForProvisionalLoad(WebLocalFrame*) { } |
270 | 266 |
271 // The provisional load failed. The WebHistoryCommitType is the commit type | 267 // The provisional load failed. The WebHistoryCommitType is the commit type |
272 // that would have been used had the load succeeded. | 268 // that would have been used had the load succeeded. |
273 virtual void didFailProvisionalLoad(WebLocalFrame*, const WebURLError&, WebH
istoryCommitType) { } | 269 virtual void didFailProvisionalLoad(WebLocalFrame*, const WebURLError&, WebH
istoryCommitType) { } |
274 | 270 |
275 // The provisional datasource is now committed. The first part of the | 271 // The provisional datasource is now committed. The first part of the |
276 // response body has been received, and the encoding of the response | 272 // response body has been received, and the encoding of the response |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // The frame's presentation URL has changed. | 320 // The frame's presentation URL has changed. |
325 virtual void didChangeDefaultPresentation(WebLocalFrame*) { } | 321 virtual void didChangeDefaultPresentation(WebLocalFrame*) { } |
326 | 322 |
327 // The frame's theme color has changed. | 323 // The frame's theme color has changed. |
328 virtual void didChangeThemeColor() { } | 324 virtual void didChangeThemeColor() { } |
329 | 325 |
330 // Called to dispatch a load event for this frame in the FrameOwner of an | 326 // Called to dispatch a load event for this frame in the FrameOwner of an |
331 // out-of-process parent frame. | 327 // out-of-process parent frame. |
332 virtual void dispatchLoad() { } | 328 virtual void dispatchLoad() { } |
333 | 329 |
334 | |
335 // Transition navigations ----------------------------------------------- | |
336 | |
337 // Provides serialized markup of transition elements for use in the followin
g navigation. | |
338 virtual void addNavigationTransitionData(const WebTransitionElementData&) {
} | |
339 | |
340 // Web Notifications --------------------------------------------------- | 330 // Web Notifications --------------------------------------------------- |
341 | 331 |
342 // Requests permission to display platform notifications on the origin of th
is frame. | 332 // Requests permission to display platform notifications on the origin of th
is frame. |
343 virtual void requestNotificationPermission(const WebSecurityOrigin&, WebNoti
ficationPermissionCallback* callback) { } | 333 virtual void requestNotificationPermission(const WebSecurityOrigin&, WebNoti
ficationPermissionCallback* callback) { } |
344 | 334 |
345 | 335 |
346 // Push API --------------------------------------------------- | 336 // Push API --------------------------------------------------- |
347 | 337 |
348 // Used to access the embedder for the Push API. | 338 // Used to access the embedder for the Push API. |
349 virtual WebPushClient* pushClient() { return 0; } | 339 virtual WebPushClient* pushClient() { return 0; } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 // App Banners --------------------------------------------------------- | 645 // App Banners --------------------------------------------------------- |
656 virtual WebAppBannerClient* appBannerClient() { return 0; } | 646 virtual WebAppBannerClient* appBannerClient() { return 0; } |
657 | 647 |
658 protected: | 648 protected: |
659 virtual ~WebFrameClient() { } | 649 virtual ~WebFrameClient() { } |
660 }; | 650 }; |
661 | 651 |
662 } // namespace blink | 652 } // namespace blink |
663 | 653 |
664 #endif | 654 #endif |
OLD | NEW |