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

Unified Diff: examples/media_viewer/media_viewer.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 | « examples/keyboard/keyboard.cc ('k') | examples/nesting_app/nesting_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/media_viewer/media_viewer.cc
diff --git a/examples/media_viewer/media_viewer.cc b/examples/media_viewer/media_viewer.cc
index 85f32e3f48c8b9413585d8804e1cdafd28369d03..3cd63d2df56a5794f9a503413e4d2377e6700143 100644
--- a/examples/media_viewer/media_viewer.cc
+++ b/examples/media_viewer/media_viewer.cc
@@ -198,7 +198,6 @@ class MediaViewer
MediaViewer()
: shell_(nullptr),
app_(NULL),
- view_manager_(NULL),
root_view_(NULL),
control_view_(NULL),
content_view_(NULL),
@@ -244,18 +243,16 @@ class MediaViewer
}
// Overridden from ViewManagerDelegate:
- virtual void OnEmbed(ViewManager* view_manager,
- View* root,
+ virtual void OnEmbed(View* root,
ServiceProviderImpl* exported_services,
scoped_ptr<ServiceProvider> imported_services) override {
root_view_ = root;
- view_manager_ = view_manager;
- control_view_ = View::Create(view_manager_);
+ control_view_ = View::Create(root->view_manager());
control_view_->SetVisible(true);
root_view_->AddChild(control_view_);
- content_view_ = View::Create(view_manager_);
+ content_view_ = View::Create(root->view_manager());
content_view_->SetVisible(true);
root_view_->AddChild(content_view_);
@@ -269,8 +266,6 @@ class MediaViewer
virtual void OnViewManagerDisconnected(
ViewManager* view_manager) override {
- DCHECK_EQ(view_manager_, view_manager);
- view_manager_ = NULL;
base::MessageLoop::current()->Quit();
}
@@ -314,7 +309,6 @@ class MediaViewer
ApplicationImpl* app_;
scoped_ptr<ViewsInit> views_init_;
- ViewManager* view_manager_;
View* root_view_;
View* control_view_;
View* content_view_;
« no previous file with comments | « examples/keyboard/keyboard.cc ('k') | examples/nesting_app/nesting_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698