Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 #include "public/web/WebDOMEvent.h" | 76 #include "public/web/WebDOMEvent.h" |
| 77 #include "public/web/WebDocument.h" | 77 #include "public/web/WebDocument.h" |
| 78 #include "public/web/WebFormElement.h" | 78 #include "public/web/WebFormElement.h" |
| 79 #include "public/web/WebFrameClient.h" | 79 #include "public/web/WebFrameClient.h" |
| 80 #include "public/web/WebNode.h" | 80 #include "public/web/WebNode.h" |
| 81 #include "public/web/WebPermissionClient.h" | 81 #include "public/web/WebPermissionClient.h" |
| 82 #include "public/web/WebPlugin.h" | 82 #include "public/web/WebPlugin.h" |
| 83 #include "public/web/WebPluginParams.h" | 83 #include "public/web/WebPluginParams.h" |
| 84 #include "public/web/WebPluginPlaceholder.h" | 84 #include "public/web/WebPluginPlaceholder.h" |
| 85 #include "public/web/WebSecurityOrigin.h" | 85 #include "public/web/WebSecurityOrigin.h" |
| 86 #include "public/web/WebTransitionElementData.h" | |
| 86 #include "public/web/WebViewClient.h" | 87 #include "public/web/WebViewClient.h" |
| 87 #include "web/PluginPlaceholderImpl.h" | 88 #include "web/PluginPlaceholderImpl.h" |
| 88 #include "web/SharedWorkerRepositoryClientImpl.h" | 89 #include "web/SharedWorkerRepositoryClientImpl.h" |
| 89 #include "web/WebDataSourceImpl.h" | 90 #include "web/WebDataSourceImpl.h" |
| 90 #include "web/WebDevToolsAgentPrivate.h" | 91 #include "web/WebDevToolsAgentPrivate.h" |
| 91 #include "web/WebLocalFrameImpl.h" | 92 #include "web/WebLocalFrameImpl.h" |
| 92 #include "web/WebPluginContainerImpl.h" | 93 #include "web/WebPluginContainerImpl.h" |
| 93 #include "web/WebPluginLoadObserver.h" | 94 #include "web/WebPluginLoadObserver.h" |
| 94 #include "web/WebViewImpl.h" | 95 #include "web/WebViewImpl.h" |
| 95 #include "wtf/StringExtras.h" | 96 #include "wtf/StringExtras.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 471 navigationInfo.extraData = ds->extraData(); | 472 navigationInfo.extraData = ds->extraData(); |
| 472 navigationInfo.navigationType = ds->navigationType(); | 473 navigationInfo.navigationType = ds->navigationType(); |
| 473 navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy); | 474 navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy); |
| 474 navigationInfo.isRedirect = ds->isRedirect(); | 475 navigationInfo.isRedirect = ds->isRedirect(); |
| 475 navigationInfo.isTransitionNavigation = isTransitionNavigation; | 476 navigationInfo.isTransitionNavigation = isTransitionNavigation; |
| 476 | 477 |
| 477 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat ion(navigationInfo); | 478 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat ion(navigationInfo); |
| 478 return static_cast<NavigationPolicy>(webPolicy); | 479 return static_cast<NavigationPolicy>(webPolicy); |
| 479 } | 480 } |
| 480 | 481 |
| 481 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& al lowedDestinationOrigin, const String& selector, const String& markup) | 482 |
| 483 struct TransitionElementData { | |
|
Nate Chapin
2014/11/05 18:29:43
I don't see any uses of this struct.
Zhen Wang
2014/11/06 17:59:26
See the changes in Document.cpp.
Nate Chapin
2014/11/11 00:28:17
It's defined in Document.h, why the redefinition h
Zhen Wang
2014/11/11 15:12:20
Oh. My mistake. Fixed.
| |
| 484 String scope; | |
| 485 String selector; | |
| 486 String markup; | |
| 487 Vector<String> names; | |
| 488 Vector<IntRect> rects; | |
| 489 }; | |
| 490 | |
| 491 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const Document:: TransitionElementData& data) | |
| 482 { | 492 { |
| 483 if (m_webFrame->client()) | 493 if (m_webFrame->client()) { |
|
Nate Chapin
2014/11/05 18:29:43
Early exit if m_webFrame->client() is null, rather
Zhen Wang
2014/11/06 17:59:26
Done.
| |
| 484 m_webFrame->client()->addNavigationTransitionData(allowedDestinationOrig in, selector, markup); | 494 // TODO(zhenw): change to use WebTransitionElementData after the chrome side is done. |
|
Nate Chapin
2014/11/05 18:29:43
blink uses FIXME: instead of TODO(name):
Zhen Wang
2014/11/06 17:59:26
Done.
| |
| 495 Vector<String> names; | |
| 496 Vector<IntRect> rects; | |
| 497 for (size_t i = 0; i < data.elements.size(); ++i) { | |
| 498 names.append(data.elements[i].name); | |
| 499 rects.append(data.elements[i].rect); | |
| 500 } | |
| 501 m_webFrame->client()->addNavigationTransitionData( | |
| 502 WebString(data.scope), | |
| 503 WebString(data.selector), | |
| 504 WebString(data.markup), | |
| 505 WebVector<WebString>(names), | |
| 506 WebVector<WebRect>(rects)); | |
| 507 } | |
| 485 } | 508 } |
| 486 | 509 |
| 487 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) | 510 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) |
| 488 { | 511 { |
| 489 if (m_webFrame->client()) { | 512 if (m_webFrame->client()) { |
| 490 WebCachedURLRequest urlRequest(request); | 513 WebCachedURLRequest urlRequest(request); |
| 491 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); | 514 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); |
| 492 } | 515 } |
| 493 } | 516 } |
| 494 | 517 |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 853 m_webFrame->client()->didAbortLoading(m_webFrame); | 876 m_webFrame->client()->didAbortLoading(m_webFrame); |
| 854 } | 877 } |
| 855 | 878 |
| 856 void FrameLoaderClientImpl::dispatchDidChangeManifest() | 879 void FrameLoaderClientImpl::dispatchDidChangeManifest() |
| 857 { | 880 { |
| 858 if (m_webFrame->client()) | 881 if (m_webFrame->client()) |
| 859 m_webFrame->client()->didChangeManifest(m_webFrame); | 882 m_webFrame->client()->didChangeManifest(m_webFrame); |
| 860 } | 883 } |
| 861 | 884 |
| 862 } // namespace blink | 885 } // namespace blink |
| OLD | NEW |