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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 #include "web/GeolocationClientProxy.h" | 198 #include "web/GeolocationClientProxy.h" |
199 #include "web/LocalFileSystemClient.h" | 199 #include "web/LocalFileSystemClient.h" |
200 #include "web/MIDIClientProxy.h" | 200 #include "web/MIDIClientProxy.h" |
201 #include "web/NotificationPermissionClientImpl.h" | 201 #include "web/NotificationPermissionClientImpl.h" |
202 #include "web/PageOverlay.h" | 202 #include "web/PageOverlay.h" |
203 #include "web/SharedWorkerRepositoryClientImpl.h" | 203 #include "web/SharedWorkerRepositoryClientImpl.h" |
204 #include "web/TextFinder.h" | 204 #include "web/TextFinder.h" |
205 #include "web/WebDataSourceImpl.h" | 205 #include "web/WebDataSourceImpl.h" |
206 #include "web/WebDevToolsAgentPrivate.h" | 206 #include "web/WebDevToolsAgentPrivate.h" |
207 #include "web/WebPluginContainerImpl.h" | 207 #include "web/WebPluginContainerImpl.h" |
| 208 #include "web/WebRemoteFrameImpl.h" |
208 #include "web/WebViewImpl.h" | 209 #include "web/WebViewImpl.h" |
209 #include "wtf/CurrentTime.h" | 210 #include "wtf/CurrentTime.h" |
210 #include "wtf/HashMap.h" | 211 #include "wtf/HashMap.h" |
211 #include <algorithm> | 212 #include <algorithm> |
212 | 213 |
213 namespace blink { | 214 namespace blink { |
214 | 215 |
215 static int frameCount = 0; | 216 static int frameCount = 0; |
216 | 217 |
217 // Key for a StatsCounter tracking how many WebFrames are active. | 218 // Key for a StatsCounter tracking how many WebFrames are active. |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 1797 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
1797 v8::HandleScope handleScope(toIsolate(frame())); | 1798 v8::HandleScope handleScope(toIsolate(frame())); |
1798 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR
eturnValue(ScriptSourceCode(script)); | 1799 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR
eturnValue(ScriptSourceCode(script)); |
1799 if (result.IsEmpty() || !result->IsString()) | 1800 if (result.IsEmpty() || !result->IsString()) |
1800 return; | 1801 return; |
1801 String scriptResult = toCoreString(v8::Handle<v8::String>::Cast(result)); | 1802 String scriptResult = toCoreString(v8::Handle<v8::String>::Cast(result)); |
1802 if (!frame()->navigationScheduler().locationChangePending()) | 1803 if (!frame()->navigationScheduler().locationChangePending()) |
1803 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul
t, ownerDocument.get()); | 1804 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul
t, ownerDocument.get()); |
1804 } | 1805 } |
1805 | 1806 |
| 1807 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra
me) |
| 1808 { |
| 1809 Frame* oldFrame = toCoreFrame(oldWebFrame); |
| 1810 OwnPtr<FrameOwner> tempOwner = adoptPtr(new PlaceholderFrameOwner()); |
| 1811 m_frame = LocalFrame::create(&m_frameLoaderClientImpl, oldFrame->host(), tem
pOwner.get()); |
| 1812 m_frame->setOwner(oldFrame->owner()); |
| 1813 m_frame->tree().setName(oldFrame->tree().name()); |
| 1814 setParent(oldWebFrame->parent()); |
| 1815 // We must call init() after m_frame is assigned because it is referenced |
| 1816 // during init(). Note that this may dispatch JS events; the frame may be |
| 1817 // detached after init() returns. |
| 1818 m_frame->init(); |
| 1819 } |
| 1820 |
1806 void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina
tionURL) | 1821 void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina
tionURL) |
1807 { | 1822 { |
1808 ASSERT(frame()); | 1823 ASSERT(frame()); |
1809 const Node* node = linkNode.constUnwrap<Node>(); | 1824 const Node* node = linkNode.constUnwrap<Node>(); |
1810 if (isHTMLAnchorElement(node)) | 1825 if (isHTMLAnchorElement(node)) |
1811 toHTMLAnchorElement(node)->sendPings(destinationURL); | 1826 toHTMLAnchorElement(node)->sendPings(destinationURL); |
1812 } | 1827 } |
1813 | 1828 |
1814 bool WebLocalFrameImpl::isLoading() const | 1829 bool WebLocalFrameImpl::isLoading() const |
1815 { | 1830 { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 | 1932 |
1918 void WebLocalFrameImpl::invalidateAll() const | 1933 void WebLocalFrameImpl::invalidateAll() const |
1919 { | 1934 { |
1920 ASSERT(frame() && frame()->view()); | 1935 ASSERT(frame() && frame()->view()); |
1921 FrameView* view = frame()->view(); | 1936 FrameView* view = frame()->view(); |
1922 view->invalidateRect(view->frameRect()); | 1937 view->invalidateRect(view->frameRect()); |
1923 invalidateScrollbar(); | 1938 invalidateScrollbar(); |
1924 } | 1939 } |
1925 | 1940 |
1926 } // namespace blink | 1941 } // namespace blink |
OLD | NEW |