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

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

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « shell/shell_test_base.h ('k') | sky/viewer/document_view.cc » ('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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 PassRefPtr<DartValue> HTMLIFrameElement::takeExposedServicesHandle(DartState*) 78 PassRefPtr<DartValue> HTMLIFrameElement::takeExposedServicesHandle(DartState*)
79 { 79 {
80 return DartValue::Create(); 80 return DartValue::Create();
81 } 81 }
82 82
83 void HTMLIFrameElement::embedViewManagerClient(RefPtr<DartValue> client) 83 void HTMLIFrameElement::embedViewManagerClient(RefPtr<DartValue> client)
84 { 84 {
85 if (!m_contentView) 85 if (!m_contentView)
86 return; 86 return;
87 87
88 m_contentView->Embed(mojo::MakeProxy<mojo::ViewManagerClient>( 88 m_contentView->Embed(mojo::MakeProxy(
89 DartConverter<mojo::ScopedMessagePipeHandle>::FromDart(client->dart_value( )))); 89 mojo::InterfacePtrInfo<mojo::ViewManagerClient>(
jamesr 2015/04/30 23:00:46 this could probably use a temporary variable or fe
yzshen1 2015/04/30 23:21:56 Done.
90 DartConverter<mojo::ScopedMessagePipeHandle>::FromDart(client->dart_va lue()), 0u)));
90 } 91 }
91 92
92 void HTMLIFrameElement::navigateView() 93 void HTMLIFrameElement::navigateView()
93 { 94 {
94 if (!m_contentView) 95 if (!m_contentView)
95 return; 96 return;
96 97
97 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr)); 98 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr));
98 if (urlString.isEmpty()) 99 if (urlString.isEmpty())
99 urlString = blankURL().string(); 100 urlString = blankURL().string();
100 101
101 KURL url = document().completeURL(urlString); 102 KURL url = document().completeURL(urlString);
102 103
103 mojo::MessagePipe exposedServicesPipe; 104 mojo::MessagePipe exposedServicesPipe;
104 m_exposedServices = exposedServicesPipe.handle0.Pass(); 105 m_exposedServices = exposedServicesPipe.handle0.Pass();
105 106
106 m_contentView->Embed(mojo::String::From(url.string().utf8().data()), 107 m_contentView->Embed(mojo::String::From(url.string().utf8().data()),
107 mojo::GetProxy(&m_services), 108 mojo::GetProxy(&m_services),
108 mojo::MakeProxy<mojo::ServiceProvider>(exposedServicesPipe.handle1.Pass( ))); 109 mojo::MakeProxy(mojo::InterfacePtrInfo<mojo::ServiceProvider>(exposedSer vicesPipe.handle1.Pass(), 0u)));
109 } 110 }
110 111
111 } 112 }
OLDNEW
« no previous file with comments | « shell/shell_test_base.h ('k') | sky/viewer/document_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698