Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: sky/engine/web/FrameLoaderClientImpl.cpp

Issue 682413006: Add a separate call to initialize the bounds for a sky <iframe> element. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #include "config.h" 32 #include "config.h"
33 #include "web/FrameLoaderClientImpl.h" 33 #include "web/FrameLoaderClientImpl.h"
34 34
35 #include "bindings/core/v8/ScriptController.h" 35 #include "bindings/core/v8/ScriptController.h"
36 #include "core/dom/Document.h" 36 #include "core/dom/Document.h"
37 #include "core/events/MouseEvent.h" 37 #include "core/events/MouseEvent.h"
38 #include "core/frame/FrameView.h" 38 #include "core/frame/FrameView.h"
39 #include "core/frame/RemoteFrame.h"
39 #include "core/frame/Settings.h" 40 #include "core/frame/Settings.h"
40 #include "core/html/HTMLIFrameElement.h" 41 #include "core/html/HTMLIFrameElement.h"
41 #include "core/page/Chrome.h" 42 #include "core/page/Chrome.h"
42 #include "core/page/EventHandler.h" 43 #include "core/page/EventHandler.h"
43 #include "core/page/Page.h" 44 #include "core/page/Page.h"
44 #include "core/rendering/HitTestResult.h" 45 #include "core/rendering/HitTestResult.h"
45 #include "platform/MIMETypeRegistry.h" 46 #include "platform/MIMETypeRegistry.h"
46 #include "platform/RuntimeEnabledFeatures.h" 47 #include "platform/RuntimeEnabledFeatures.h"
47 #include "platform/UserGestureIndicator.h" 48 #include "platform/UserGestureIndicator.h"
48 #include "platform/exported/WrappedResourceRequest.h" 49 #include "platform/exported/WrappedResourceRequest.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na vigationPolicy policy, const String& suggestedName) 244 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na vigationPolicy policy, const String& suggestedName)
244 { 245 {
245 if (m_webFrame->client()) { 246 if (m_webFrame->client()) {
246 ASSERT(m_webFrame->frame()->document()); 247 ASSERT(m_webFrame->frame()->document());
247 WrappedResourceRequest webreq(request); 248 WrappedResourceRequest webreq(request);
248 m_webFrame->client()->loadURLExternally( 249 m_webFrame->client()->loadURLExternally(
249 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges tedName); 250 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges tedName);
250 } 251 }
251 } 252 }
252 253
253 void FrameLoaderClientImpl::createView(const KURL& url) 254 PassOwnPtr<RemoteFrame> FrameLoaderClientImpl::createChildFrame(const KURL& url)
254 { 255 {
255 if (m_webFrame->client()) { 256 if (m_webFrame->client()) {
256 m_webFrame->client()->createChildView(url); 257 mojo::View* child = m_webFrame->client()->createChildFrame(url);
258 return adoptPtr(new RemoteFrame(child));
257 } 259 }
260 ASSERT_NOT_REACHED();
261 return nullptr;
258 } 262 }
259 263
260 void FrameLoaderClientImpl::selectorMatchChanged(const Vector<String>& addedSele ctors, const Vector<String>& removedSelectors) 264 void FrameLoaderClientImpl::selectorMatchChanged(const Vector<String>& addedSele ctors, const Vector<String>& removedSelectors)
261 { 265 {
262 if (WebFrameClient* client = m_webFrame->client()) 266 if (WebFrameClient* client = m_webFrame->client())
263 client->didMatchCSS(m_webFrame, WebVector<WebString>(addedSelectors), We bVector<WebString>(removedSelectors)); 267 client->didMatchCSS(m_webFrame, WebVector<WebString>(addedSelectors), We bVector<WebString>(removedSelectors));
264 } 268 }
265 269
266 // Called when the FrameLoader goes into a state in which a new page load 270 // Called when the FrameLoader goes into a state in which a new page load
267 // will occur. 271 // will occur.
268 void FrameLoaderClientImpl::transitionToCommittedForNewPage() 272 void FrameLoaderClientImpl::transitionToCommittedForNewPage()
269 { 273 {
270 m_webFrame->createFrameView(); 274 m_webFrame->createFrameView();
271 } 275 }
272 276
273 void FrameLoaderClientImpl::didLoseWebGLContext(int arbRobustnessContextLostReas on) 277 void FrameLoaderClientImpl::didLoseWebGLContext(int arbRobustnessContextLostReas on)
274 { 278 {
275 if (m_webFrame->client()) 279 if (m_webFrame->client())
276 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte xtLostReason); 280 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte xtLostReason);
277 } 281 }
278 282
279 void FrameLoaderClientImpl::dispatchDidChangeManifest() 283 void FrameLoaderClientImpl::dispatchDidChangeManifest()
280 { 284 {
281 if (m_webFrame->client()) 285 if (m_webFrame->client())
282 m_webFrame->client()->didChangeManifest(m_webFrame); 286 m_webFrame->client()->didChangeManifest(m_webFrame);
283 } 287 }
284 288
285 } // namespace blink 289 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698