| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 // Failure is reported as a null string. | 447 // Failure is reported as a null string. |
| 448 String resultStr; | 448 String resultStr; |
| 449 result.getString(resultStr); | 449 result.getString(resultStr); |
| 450 return resultStr; | 450 return resultStr; |
| 451 } | 451 } |
| 452 | 452 |
| 453 void WebPluginContainerImpl::loadFrameRequest(const WebURLRequest& request, cons
t WebString& target, bool notifyNeeded, void* notifyData) | 453 void WebPluginContainerImpl::loadFrameRequest(const WebURLRequest& request, cons
t WebString& target, bool notifyNeeded, void* notifyData) |
| 454 { | 454 { |
| 455 Frame* frame = m_element->document().frame(); | 455 Frame* frame = m_element->document().frame(); |
| 456 if (!frame || !frame->loader()->documentLoader()) | 456 if (!frame || !frame->loader().documentLoader()) |
| 457 return; // FIXME: send a notification in this case? | 457 return; // FIXME: send a notification in this case? |
| 458 | 458 |
| 459 if (notifyNeeded) { | 459 if (notifyNeeded) { |
| 460 // FIXME: This is a bit of hack to allow us to observe completion of | 460 // FIXME: This is a bit of hack to allow us to observe completion of |
| 461 // our frame request. It would be better to evolve FrameLoader to | 461 // our frame request. It would be better to evolve FrameLoader to |
| 462 // support a completion callback instead. | 462 // support a completion callback instead. |
| 463 OwnPtr<WebPluginLoadObserver> observer = adoptPtr(new WebPluginLoadObser
ver(this, request.url(), notifyData)); | 463 OwnPtr<WebPluginLoadObserver> observer = adoptPtr(new WebPluginLoadObser
ver(this, request.url(), notifyData)); |
| 464 // FIXME: Calling get here is dangerous! What if observer is freed? | 464 // FIXME: Calling get here is dangerous! What if observer is freed? |
| 465 m_pluginLoadObservers.append(observer.get()); | 465 m_pluginLoadObservers.append(observer.get()); |
| 466 WebDataSourceImpl::setNextPluginLoadObserver(observer.release()); | 466 WebDataSourceImpl::setNextPluginLoadObserver(observer.release()); |
| 467 } | 467 } |
| 468 | 468 |
| 469 FrameLoadRequest frameRequest(frame->document()->securityOrigin(), request.t
oResourceRequest(), target); | 469 FrameLoadRequest frameRequest(frame->document()->securityOrigin(), request.t
oResourceRequest(), target); |
| 470 UserGestureIndicator gestureIndicator(request.hasUserGesture() ? DefinitelyP
rocessingNewUserGesture : PossiblyProcessingUserGesture); | 470 UserGestureIndicator gestureIndicator(request.hasUserGesture() ? DefinitelyP
rocessingNewUserGesture : PossiblyProcessingUserGesture); |
| 471 frame->loader()->load(frameRequest); | 471 frame->loader().load(frameRequest); |
| 472 } | 472 } |
| 473 | 473 |
| 474 void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel) | 474 void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel) |
| 475 { | 475 { |
| 476 WebViewImpl* view = WebViewImpl::fromPage(m_element->document().frame()->pag
e()); | 476 WebViewImpl* view = WebViewImpl::fromPage(m_element->document().frame()->pag
e()); |
| 477 view->fullFramePluginZoomLevelChanged(zoomLevel); | 477 view->fullFramePluginZoomLevelChanged(zoomLevel); |
| 478 } | 478 } |
| 479 | 479 |
| 480 bool WebPluginContainerImpl::isRectTopmost(const WebRect& rect) | 480 bool WebPluginContainerImpl::isRectTopmost(const WebRect& rect) |
| 481 { | 481 { |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 // Take our element and get the clip rect from the enclosing layer and | 891 // Take our element and get the clip rect from the enclosing layer and |
| 892 // frame view. | 892 // frame view. |
| 893 clipRect.intersect( | 893 clipRect.intersect( |
| 894 m_element->document().view()->windowClipRectForFrameOwner(m_element,
true)); | 894 m_element->document().view()->windowClipRectForFrameOwner(m_element,
true)); |
| 895 } | 895 } |
| 896 | 896 |
| 897 return clipRect; | 897 return clipRect; |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace WebKit | 900 } // namespace WebKit |
| OLD | NEW |