| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const | 301 v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const |
| 302 { | 302 { |
| 303 return toV8Context(frame(), DOMWrapperWorld::mainWorld()); | 303 return toV8Context(frame(), DOMWrapperWorld::mainWorld()); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void WebLocalFrameImpl::load(const WebURL& url, mojo::ScopedDataPipeConsumerHand
le responseStream) | 306 void WebLocalFrameImpl::load(const WebURL& url, mojo::ScopedDataPipeConsumerHand
le responseStream) |
| 307 { | 307 { |
| 308 frame()->mojoLoader().load(url, responseStream.Pass()); | 308 frame()->mojoLoader().load(url, responseStream.Pass()); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void WebLocalFrameImpl::setReferrerForRequest(WebURLRequest& request, const WebU
RL& referrerURL) | |
| 312 { | |
| 313 String referrer = referrerURL.isEmpty() ? frame()->document()->outgoingRefer
rer() : String(referrerURL.spec().utf16()); | |
| 314 referrer = SecurityPolicy::generateReferrerHeader(frame()->document()->refer
rerPolicy(), request.url(), referrer); | |
| 315 if (referrer.isEmpty()) | |
| 316 return; | |
| 317 request.setHTTPReferrer(referrer, static_cast<WebReferrerPolicy>(frame()->do
cument()->referrerPolicy())); | |
| 318 } | |
| 319 | |
| 320 unsigned WebLocalFrameImpl::unloadListenerCount() const | |
| 321 { | |
| 322 return frame()->domWindow()->pendingUnloadEventListeners(); | |
| 323 } | |
| 324 | |
| 325 void WebLocalFrameImpl::replaceSelection(const WebString& text) | 311 void WebLocalFrameImpl::replaceSelection(const WebString& text) |
| 326 { | 312 { |
| 327 bool selectReplacement = false; | 313 bool selectReplacement = false; |
| 328 bool smartReplace = true; | 314 bool smartReplace = true; |
| 329 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); | 315 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); |
| 330 } | 316 } |
| 331 | 317 |
| 332 void WebLocalFrameImpl::insertText(const WebString& text) | 318 void WebLocalFrameImpl::insertText(const WebString& text) |
| 333 { | 319 { |
| 334 if (frame()->inputMethodController().hasComposition()) | 320 if (frame()->inputMethodController().hasComposition()) |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 656 |
| 671 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse
t, float contentScaleFactor) | 657 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse
t, float contentScaleFactor) |
| 672 { | 658 { |
| 673 m_inputEventsOffsetForEmulation = offset; | 659 m_inputEventsOffsetForEmulation = offset; |
| 674 m_inputEventsScaleFactorForEmulation = contentScaleFactor; | 660 m_inputEventsScaleFactorForEmulation = contentScaleFactor; |
| 675 if (frame()->view()) | 661 if (frame()->view()) |
| 676 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset
ForEmulation, m_inputEventsScaleFactorForEmulation); | 662 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset
ForEmulation, m_inputEventsScaleFactorForEmulation); |
| 677 } | 663 } |
| 678 | 664 |
| 679 } // namespace blink | 665 } // namespace blink |
| OLD | NEW |