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

Unified Diff: sky/tools/tester/tester.cc

Issue 815003002: Nukes ViewManager arg from ViewManagerDelegate::OnEmbed (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: format Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tools/debugger/debugger.cc ('k') | sky/viewer/document_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/tester/tester.cc
diff --git a/sky/tools/tester/tester.cc b/sky/tools/tester/tester.cc
index 4ee889ee06f53e25a1cce7680840aea73e34ed99..c816d006c9da3059df090fa1d8a2fe7b425d6ccc 100644
--- a/sky/tools/tester/tester.cc
+++ b/sky/tools/tester/tester.cc
@@ -61,7 +61,6 @@ class SkyTester : public mojo::ApplicationDelegate,
public:
SkyTester()
: window_manager_app_(new window_manager::WindowManagerApp(this, this)),
- view_manager_(NULL),
root_(NULL),
content_(NULL),
weak_ptr_factory_(this) {}
@@ -85,15 +84,13 @@ class SkyTester : public mojo::ApplicationDelegate,
// Overridden from mojo::ViewManagerDelegate:
virtual void OnEmbed(
- mojo::ViewManager* view_manager,
mojo::View* root,
mojo::ServiceProviderImpl* exported_services,
scoped_ptr<mojo::ServiceProvider> remote_service_provider) override {
- view_manager_ = view_manager;
root_ = root;
root_->AddObserver(this);
- content_ = mojo::View::Create(view_manager_);
+ content_ = mojo::View::Create(root->view_manager());
content_->SetBounds(root_->bounds());
root_->AddChild(content_);
content_->SetVisible(true);
@@ -111,7 +108,6 @@ class SkyTester : public mojo::ApplicationDelegate,
virtual void OnViewManagerDisconnected(
mojo::ViewManager* view_manager) override {
- view_manager_ = NULL;
root_ = NULL;
}
@@ -159,7 +155,6 @@ class SkyTester : public mojo::ApplicationDelegate,
std::string url_from_args_;
- mojo::ViewManager* view_manager_;
mojo::View* root_;
mojo::View* content_;
« no previous file with comments | « sky/tools/debugger/debugger.cc ('k') | sky/viewer/document_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698