mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Moves Create() off of View and onto ViewManager
This makes more sense given the ViewManager is used to create the view. R=ben@chromium.org Review URL: https://codereview.chromium.org/818583002
This commit is contained in:
parent
a4ea8c30fe
commit
bafedfb8f6
@ -52,7 +52,7 @@ void SkyDebugger::OnEmbed(
|
||||
|
||||
window_manager_app_->SetViewportSize(gfx::Size(320, 640));
|
||||
|
||||
content_ = mojo::View::Create(root->view_manager());
|
||||
content_ = root->view_manager()->CreateView();
|
||||
content_->SetBounds(root_->bounds());
|
||||
root_->AddChild(content_);
|
||||
content_->SetVisible(true);
|
||||
|
||||
@ -90,7 +90,7 @@ class SkyTester : public mojo::ApplicationDelegate,
|
||||
root_ = root;
|
||||
root_->AddObserver(this);
|
||||
|
||||
content_ = mojo::View::Create(root->view_manager());
|
||||
content_ = root->view_manager()->CreateView();
|
||||
content_->SetBounds(root_->bounds());
|
||||
root_->AddChild(content_);
|
||||
content_->SetVisible(true);
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include "mojo/public/interfaces/application/shell.mojom.h"
|
||||
#include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h"
|
||||
#include "mojo/services/view_manager/public/cpp/view.h"
|
||||
#include "mojo/services/view_manager/public/cpp/view_manager.h"
|
||||
#include "skia/ext/refptr.h"
|
||||
#include "sky/compositor/layer.h"
|
||||
#include "sky/compositor/layer_host.h"
|
||||
@ -172,7 +173,7 @@ mojo::View* DocumentView::createChildFrame(const blink::WebURL& url) {
|
||||
if (!root_)
|
||||
return nullptr;
|
||||
|
||||
mojo::View* child = mojo::View::Create(root_->view_manager());
|
||||
mojo::View* child = root_->view_manager()->CreateView();
|
||||
child->SetVisible(true);
|
||||
root_->AddChild(child);
|
||||
child->Embed(mojo::String::From(url.string().utf8()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user