OLD | NEW |
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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 bool WebLocalFrameImpl::isViewSourceModeEnabled() const | 917 bool WebLocalFrameImpl::isViewSourceModeEnabled() const |
918 { | 918 { |
919 if (!frame()) | 919 if (!frame()) |
920 return false; | 920 return false; |
921 return frame()->inViewSourceMode(); | 921 return frame()->inViewSourceMode(); |
922 } | 922 } |
923 | 923 |
924 void WebLocalFrameImpl::setReferrerForRequest(WebURLRequest& request, const WebU
RL& referrerURL) | 924 void WebLocalFrameImpl::setReferrerForRequest(WebURLRequest& request, const WebU
RL& referrerURL) |
925 { | 925 { |
926 String referrer = referrerURL.isEmpty() ? frame()->document()->outgoingRefer
rer() : String(referrerURL.spec().utf16()); | 926 String referrer = referrerURL.isEmpty() ? frame()->document()->outgoingRefer
rer() : String(referrerURL.spec().utf16()); |
927 referrer = SecurityPolicy::generateReferrerHeader(frame()->document()->refer
rerPolicy(), request.url(), referrer); | 927 request.toMutableResourceRequest().setHTTPReferrer(SecurityPolicy::generateR
eferrer(frame()->document()->referrerPolicy(), request.url(), referrer)); |
928 if (referrer.isEmpty()) | |
929 return; | |
930 request.setHTTPReferrer(referrer, static_cast<WebReferrerPolicy>(frame()->do
cument()->referrerPolicy())); | |
931 } | 928 } |
932 | 929 |
933 void WebLocalFrameImpl::dispatchWillSendRequest(WebURLRequest& request) | 930 void WebLocalFrameImpl::dispatchWillSendRequest(WebURLRequest& request) |
934 { | 931 { |
935 ResourceResponse response; | 932 ResourceResponse response; |
936 frame()->loader().client()->dispatchWillSendRequest(0, 0, request.toMutableR
esourceRequest(), response); | 933 frame()->loader().client()->dispatchWillSendRequest(0, 0, request.toMutableR
esourceRequest(), response); |
937 } | 934 } |
938 | 935 |
939 WebURLLoader* WebLocalFrameImpl::createAssociatedURLLoader(const WebURLLoaderOpt
ions& options) | 936 WebURLLoader* WebLocalFrameImpl::createAssociatedURLLoader(const WebURLLoaderOpt
ions& options) |
940 { | 937 { |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 | 1914 |
1918 void WebLocalFrameImpl::invalidateAll() const | 1915 void WebLocalFrameImpl::invalidateAll() const |
1919 { | 1916 { |
1920 ASSERT(frame() && frame()->view()); | 1917 ASSERT(frame() && frame()->view()); |
1921 FrameView* view = frame()->view(); | 1918 FrameView* view = frame()->view(); |
1922 view->invalidateRect(view->frameRect()); | 1919 view->invalidateRect(view->frameRect()); |
1923 invalidateScrollbar(); | 1920 invalidateScrollbar(); |
1924 } | 1921 } |
1925 | 1922 |
1926 } // namespace blink | 1923 } // namespace blink |
OLD | NEW |