OLD | NEW |
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/viewer/document_view.h" | 5 #include "sky/viewer/document_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 if (!web_view_->settings()->compositorIsEnabled()) | 163 if (!web_view_->settings()->compositorIsEnabled()) |
164 web_layer_tree_view_impl_->setNeedsAnimate(); | 164 web_layer_tree_view_impl_->setNeedsAnimate(); |
165 } | 165 } |
166 | 166 |
167 mojo::View* DocumentView::createChildFrame(const blink::WebURL& url) { | 167 mojo::View* DocumentView::createChildFrame(const blink::WebURL& url) { |
168 if (!root_) | 168 if (!root_) |
169 return nullptr; | 169 return nullptr; |
170 | 170 |
171 mojo::View* child = mojo::View::Create(root_->view_manager()); | 171 mojo::View* child = mojo::View::Create(root_->view_manager()); |
| 172 child->SetVisible(true); |
172 root_->AddChild(child); | 173 root_->AddChild(child); |
173 child->Embed(mojo::String::From(url.string().utf8())); | 174 child->Embed(mojo::String::From(url.string().utf8())); |
174 | 175 |
175 return child; | 176 return child; |
176 } | 177 } |
177 | 178 |
178 void DocumentView::frameDetached(blink::WebFrame* frame) { | 179 void DocumentView::frameDetached(blink::WebFrame* frame) { |
179 // |frame| is invalid after here. | 180 // |frame| is invalid after here. |
180 frame->close(); | 181 frame->close(); |
181 } | 182 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 248 |
248 void DocumentView::OnViewInputEvent( | 249 void DocumentView::OnViewInputEvent( |
249 mojo::View* view, const mojo::EventPtr& event) { | 250 mojo::View* view, const mojo::EventPtr& event) { |
250 scoped_ptr<blink::WebInputEvent> web_event = | 251 scoped_ptr<blink::WebInputEvent> web_event = |
251 event.To<scoped_ptr<blink::WebInputEvent> >(); | 252 event.To<scoped_ptr<blink::WebInputEvent> >(); |
252 if (web_event) | 253 if (web_event) |
253 web_view_->handleInputEvent(*web_event); | 254 web_view_->handleInputEvent(*web_event); |
254 } | 255 } |
255 | 256 |
256 } // namespace sky | 257 } // namespace sky |
OLD | NEW |