| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 // Note: if browser side navigations are enabled, the client may modify | 215 // Note: if browser side navigations are enabled, the client may modify |
| 216 // the urlRequest. However, should this happen, the client should change | 216 // the urlRequest. However, should this happen, the client should change |
| 217 // the WebNavigationPolicy to WebNavigationPolicyIgnore, and the load | 217 // the WebNavigationPolicy to WebNavigationPolicyIgnore, and the load |
| 218 // should stop in blink. In all other cases, the urlRequest should not | 218 // should stop in blink. In all other cases, the urlRequest should not |
| 219 // be modified. | 219 // be modified. |
| 220 WebURLRequest& urlRequest; | 220 WebURLRequest& urlRequest; |
| 221 WebNavigationType navigationType; | 221 WebNavigationType navigationType; |
| 222 WebNavigationPolicy defaultPolicy; | 222 WebNavigationPolicy defaultPolicy; |
| 223 bool replacesCurrentHistoryItem; | 223 bool replacesCurrentHistoryItem; |
| 224 bool isHistoryNavigationInNewChildFrame; |
| 224 | 225 |
| 225 NavigationPolicyInfo(WebURLRequest& urlRequest) | 226 NavigationPolicyInfo(WebURLRequest& urlRequest) |
| 226 : extraData(nullptr) | 227 : extraData(nullptr) |
| 227 , urlRequest(urlRequest) | 228 , urlRequest(urlRequest) |
| 228 , navigationType(WebNavigationTypeOther) | 229 , navigationType(WebNavigationTypeOther) |
| 229 , defaultPolicy(WebNavigationPolicyIgnore) | 230 , defaultPolicy(WebNavigationPolicyIgnore) |
| 230 , replacesCurrentHistoryItem(false) | 231 , replacesCurrentHistoryItem(false) |
| 232 , isHistoryNavigationInNewChildFrame(false) |
| 231 { | 233 { |
| 232 } | 234 } |
| 233 }; | 235 }; |
| 234 | 236 |
| 235 virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicy
Info& info) | 237 virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicy
Info& info) |
| 236 { | 238 { |
| 237 return info.defaultPolicy; | 239 return info.defaultPolicy; |
| 238 } | 240 } |
| 239 | 241 |
| 240 // During a history navigation, we may choose to load new subframes from his
tory as well. | 242 // During a history navigation, we may choose to load new subframes from his
tory as well. |
| 241 // This returns such a history item if appropriate. | 243 // This returns such a history item if appropriate. |
| 242 virtual WebHistoryItem historyItemForNewChildFrame(WebFrame*) { return WebHi
storyItem(); } | 244 virtual WebHistoryItem historyItemForNewChildFrame() { return WebHistoryItem
(); } |
| 243 | 245 |
| 244 // Whether the client is handling a navigation request. | 246 // Whether the client is handling a navigation request. |
| 245 virtual bool hasPendingNavigation(WebLocalFrame*) { return false; } | 247 virtual bool hasPendingNavigation(WebLocalFrame*) { return false; } |
| 246 | 248 |
| 247 // Navigational notifications ------------------------------------------ | 249 // Navigational notifications ------------------------------------------ |
| 248 | 250 |
| 249 // These notifications bracket any loading that occurs in the WebFrame. | 251 // These notifications bracket any loading that occurs in the WebFrame. |
| 250 virtual void didStartLoading(bool toDifferentDocument) { } | 252 virtual void didStartLoading(bool toDifferentDocument) { } |
| 251 virtual void didStopLoading() { } | 253 virtual void didStopLoading() { } |
| 252 | 254 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 // This method takes ownership of the callbacks pointer. | 698 // This method takes ownership of the callbacks pointer. |
| 697 virtual void checkIfAudioSinkExistsAndIsAuthorized(const WebString& sinkId,
const WebSecurityOrigin&, WebSetSinkIdCallbacks*) { BLINK_ASSERT_NOT_REACHED();
} | 699 virtual void checkIfAudioSinkExistsAndIsAuthorized(const WebString& sinkId,
const WebSecurityOrigin&, WebSetSinkIdCallbacks*) { BLINK_ASSERT_NOT_REACHED();
} |
| 698 | 700 |
| 699 protected: | 701 protected: |
| 700 virtual ~WebFrameClient() { } | 702 virtual ~WebFrameClient() { } |
| 701 }; | 703 }; |
| 702 | 704 |
| 703 } // namespace blink | 705 } // namespace blink |
| 704 | 706 |
| 705 #endif | 707 #endif |
| OLD | NEW |