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 m_frame = LocalFrame::create(&m_frameLoaderClientImpl, oldFrame->host(), new PlaceholderFrameOwner()); | |
dcheng
2014/10/15 21:14:35
Is PlaceholderFrameOwner the right one? Do we not
Nate Chapin
2014/10/15 21:27:31
I don't think we enforce them in the provisional s
Nate Chapin
2014/10/16 21:45:56
This function now creates the LocalFrame with a Pl
| |
1811 m_frame->tree().setName(oldFrame->tree().name()); | |
1812 setParent(oldWebFrame->parent()); | |
1813 // We must call init() after m_frame is assigned because it is referenced | |
1814 // during init(). Note that this may dispatch JS events; the frame may be | |
1815 // detached after init() returns. | |
1816 m_frame->init(); | |
1817 } | |
1818 | |
1806 void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina tionURL) | 1819 void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina tionURL) |
1807 { | 1820 { |
1808 ASSERT(frame()); | 1821 ASSERT(frame()); |
1809 const Node* node = linkNode.constUnwrap<Node>(); | 1822 const Node* node = linkNode.constUnwrap<Node>(); |
1810 if (isHTMLAnchorElement(node)) | 1823 if (isHTMLAnchorElement(node)) |
1811 toHTMLAnchorElement(node)->sendPings(destinationURL); | 1824 toHTMLAnchorElement(node)->sendPings(destinationURL); |
1812 } | 1825 } |
1813 | 1826 |
1814 bool WebLocalFrameImpl::isLoading() const | 1827 bool WebLocalFrameImpl::isLoading() const |
1815 { | 1828 { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1917 | 1930 |
1918 void WebLocalFrameImpl::invalidateAll() const | 1931 void WebLocalFrameImpl::invalidateAll() const |
1919 { | 1932 { |
1920 ASSERT(frame() && frame()->view()); | 1933 ASSERT(frame() && frame()->view()); |
1921 FrameView* view = frame()->view(); | 1934 FrameView* view = frame()->view(); |
1922 view->invalidateRect(view->frameRect()); | 1935 view->invalidateRect(view->frameRect()); |
1923 invalidateScrollbar(); | 1936 invalidateScrollbar(); |
1924 } | 1937 } |
1925 | 1938 |
1926 } // namespace blink | 1939 } // namespace blink |
OLD | NEW |