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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text)); | 252 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text)); |
253 } | 253 } |
254 | 254 |
255 void WebLocalFrameImpl::collectGarbage() | 255 void WebLocalFrameImpl::collectGarbage() |
256 { | 256 { |
257 // TODO(dart): Implement. | 257 // TODO(dart): Implement. |
258 } | 258 } |
259 | 259 |
260 void WebLocalFrameImpl::load(const WebURL& url, mojo::ScopedDataPipeConsumerHand
le responseStream) | 260 void WebLocalFrameImpl::load(const WebURL& url, mojo::ScopedDataPipeConsumerHand
le responseStream) |
261 { | 261 { |
262 frame()->mojoLoader().init(url); | 262 frame()->mojoLoader().init(url); |
263 frame()->mojoLoader().parse(responseStream.Pass()); | 263 frame()->mojoLoader().parse(responseStream.Pass()); |
264 } | 264 } |
265 | 265 |
266 void WebLocalFrameImpl::load(const WebURL& url) | 266 void WebLocalFrameImpl::load(const WebURL& url) |
267 { | 267 { |
268 frame()->mojoLoader().init(url); | 268 frame()->mojoLoader().init(url); |
269 m_fetcher = adoptPtr(new MojoFetcher(this, url)); | 269 m_fetcher = adoptPtr(new MojoFetcher(this, url)); |
270 } | 270 } |
271 | 271 |
272 void WebLocalFrameImpl::OnReceivedResponse(mojo::URLResponsePtr response) | 272 void WebLocalFrameImpl::OnReceivedResponse(mojo::URLResponsePtr response) |
273 { | 273 { |
274 m_fetcher.clear(); | 274 m_fetcher.clear(); |
275 if (!response->body.is_valid()) | 275 if (!response->body.is_valid()) |
276 LOG(FATAL) << "Response has no body."; | 276 LOG(FATAL) << "Response has no body."; |
277 frame()->mojoLoader().parse(response->body.Pass()); | 277 frame()->mojoLoader().parse(response->body.Pass()); |
278 } | 278 } |
279 | 279 |
280 void WebLocalFrameImpl::replaceSelection(const WebString& text) | 280 void WebLocalFrameImpl::replaceSelection(const WebString& text) |
281 { | 281 { |
282 bool selectReplacement = false; | 282 bool selectReplacement = false; |
283 bool smartReplace = true; | 283 bool smartReplace = true; |
284 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); | 284 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); |
285 } | 285 } |
286 | 286 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 | 589 |
590 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse
t, float contentScaleFactor) | 590 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse
t, float contentScaleFactor) |
591 { | 591 { |
592 m_inputEventsOffsetForEmulation = offset; | 592 m_inputEventsOffsetForEmulation = offset; |
593 m_inputEventsScaleFactorForEmulation = contentScaleFactor; | 593 m_inputEventsScaleFactorForEmulation = contentScaleFactor; |
594 if (frame()->view()) | 594 if (frame()->view()) |
595 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset
ForEmulation, m_inputEventsScaleFactorForEmulation); | 595 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset
ForEmulation, m_inputEventsScaleFactorForEmulation); |
596 } | 596 } |
597 | 597 |
598 } // namespace blink | 598 } // namespace blink |
OLD | NEW |