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

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

Issue 948943002: Gets HTMLIFrameElement::embedViewManagerClient to work with dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 PassRefPtr<DartValue> HTMLIFrameElement::takeServicesHandle(DartState*) 72 PassRefPtr<DartValue> HTMLIFrameElement::takeServicesHandle(DartState*)
73 { 73 {
74 return DartValue::Create(); 74 return DartValue::Create();
75 } 75 }
76 76
77 PassRefPtr<DartValue> HTMLIFrameElement::takeExposedServicesHandle(DartState*) 77 PassRefPtr<DartValue> HTMLIFrameElement::takeExposedServicesHandle(DartState*)
78 { 78 {
79 return DartValue::Create(); 79 return DartValue::Create();
80 } 80 }
81 81
82 void HTMLIFrameElement::embedViewManagerClient(DartValue* client) { 82 void HTMLIFrameElement::embedViewManagerClient(RefPtr<DartValue> client)
83 {
83 if (!m_contentView) 84 if (!m_contentView)
84 return; 85 return;
85 86
86 // TODO(dart) 87 m_contentView->Embed(mojo::MakeProxy<mojo::ViewManagerClient>(
87 // mojo::MessagePipeHandle handle; 88 DartConverter<mojo::ScopedMessagePipeHandle>::FromDart(client->dart_value( ))));
88 // if (gin::ConvertFromV8(client.isolate(), client.v8Value(), &handle))
89 // m_contentView->Embed(mojo::MakeProxy<mojo::ViewManagerClient>(mojo::MakeS copedHandle(handle)));
90 } 89 }
91 90
92 void HTMLIFrameElement::navigateView() 91 void HTMLIFrameElement::navigateView()
93 { 92 {
94 if (!m_contentView) 93 if (!m_contentView)
95 return; 94 return;
96 95
97 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr)); 96 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr));
98 if (urlString.isEmpty()) 97 if (urlString.isEmpty())
99 urlString = blankURL().string(); 98 urlString = blankURL().string();
100 99
101 KURL url = document().completeURL(urlString); 100 KURL url = document().completeURL(urlString);
102 101
103 mojo::MessagePipe exposedServicesPipe; 102 mojo::MessagePipe exposedServicesPipe;
104 m_exposedServices = exposedServicesPipe.handle0.Pass(); 103 m_exposedServices = exposedServicesPipe.handle0.Pass();
105 104
106 m_contentView->Embed(mojo::String::From(url.string().utf8().data()), 105 m_contentView->Embed(mojo::String::From(url.string().utf8().data()),
107 mojo::GetProxy(&m_services), 106 mojo::GetProxy(&m_services),
108 mojo::MakeProxy<mojo::ServiceProvider>(exposedServicesPipe.handle1.Pass( ))); 107 mojo::MakeProxy<mojo::ServiceProvider>(exposedServicesPipe.handle1.Pass( )));
109 } 108 }
110 109
111 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698