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

Side by Side Diff: sky/engine/core/html/HTMLIFrameElement.cpp

Issue 793393003: Move the call to mojo::View::Embed to HTMLIFrameElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « no previous file | sky/engine/core/loader/EmptyClients.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/html/HTMLIFrameElement.h" 6 #include "sky/engine/core/html/HTMLIFrameElement.h"
7 7
8 #include "gen/sky/core/HTMLNames.h" 8 #include "gen/sky/core/HTMLNames.h"
9 #include "sky/engine/core/frame/LocalFrame.h" 9 #include "sky/engine/core/frame/LocalFrame.h"
10 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" 10 #include "sky/engine/core/html/parser/HTMLParserIdioms.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 { 59 {
60 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr)); 60 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr));
61 if (urlString.isEmpty()) 61 if (urlString.isEmpty())
62 urlString = blankURL().string(); 62 urlString = blankURL().string();
63 63
64 LocalFrame* parentFrame = document().frame(); 64 LocalFrame* parentFrame = document().frame();
65 if (!parentFrame) 65 if (!parentFrame)
66 return; 66 return;
67 67
68 KURL url = document().completeURL(urlString); 68 KURL url = document().completeURL(urlString);
69 m_contentView = parentFrame->loaderClient()->createChildFrame(url); 69 m_contentView = parentFrame->loaderClient()->createChildFrame();
70 if (m_contentView) 70 if (!m_contentView)
71 m_contentView->AddObserver(this); 71 return;
72
73 m_contentView->Embed(mojo::String::From(url.string().utf8().data()));
74 m_contentView->AddObserver(this);
72 } 75 }
73 76
74 } 77 }
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698