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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 379 |
380 // Failure is reported as a null string. | 380 // Failure is reported as a null string. |
381 String resultStr; | 381 String resultStr; |
382 result.getString(resultStr); | 382 result.getString(resultStr); |
383 return resultStr; | 383 return resultStr; |
384 } | 384 } |
385 | 385 |
386 void WebPluginContainerImpl::loadFrameRequest(const WebURLRequest& request, cons
t WebString& target, bool notifyNeeded, void* notifyData) | 386 void WebPluginContainerImpl::loadFrameRequest(const WebURLRequest& request, cons
t WebString& target, bool notifyNeeded, void* notifyData) |
387 { | 387 { |
388 Frame* frame = m_element->document()->frame(); | 388 Frame* frame = m_element->document()->frame(); |
389 if (!frame) | 389 if (!frame || !frame->loader()->documentLoader()) |
390 return; // FIXME: send a notification in this case? | 390 return; // FIXME: send a notification in this case? |
391 | 391 |
392 if (notifyNeeded) { | 392 if (notifyNeeded) { |
393 // FIXME: This is a bit of hack to allow us to observe completion of | 393 // FIXME: This is a bit of hack to allow us to observe completion of |
394 // our frame request. It would be better to evolve FrameLoader to | 394 // our frame request. It would be better to evolve FrameLoader to |
395 // support a completion callback instead. | 395 // support a completion callback instead. |
396 OwnPtr<WebPluginLoadObserver> observer = adoptPtr(new WebPluginLoadObser
ver(this, request.url(), notifyData)); | 396 OwnPtr<WebPluginLoadObserver> observer = adoptPtr(new WebPluginLoadObser
ver(this, request.url(), notifyData)); |
397 // FIXME: Calling get here is dangerous! What if observer is freed? | 397 // FIXME: Calling get here is dangerous! What if observer is freed? |
398 m_pluginLoadObservers.append(observer.get()); | 398 m_pluginLoadObservers.append(observer.get()); |
399 WebDataSourceImpl::setNextPluginLoadObserver(observer.release()); | 399 WebDataSourceImpl::setNextPluginLoadObserver(observer.release()); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 // frame view. | 642 // frame view. |
643 RenderLayer* layer = m_element->renderer()->enclosingLayer(); | 643 RenderLayer* layer = m_element->renderer()->enclosingLayer(); |
644 clipRect.intersect( | 644 clipRect.intersect( |
645 m_element->document()->view()->windowClipRectForLayer(layer, true)); | 645 m_element->document()->view()->windowClipRectForLayer(layer, true)); |
646 } | 646 } |
647 | 647 |
648 return clipRect; | 648 return clipRect; |
649 } | 649 } |
650 | 650 |
651 } // namespace WebKit | 651 } // namespace WebKit |
OLD | NEW |