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

Unified Diff: examples/wm_flow/embedded/embedded.cc

Issue 817573003: Move wm_flow off of views and onto Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/wm_flow/app/app.cc ('k') | examples/wm_flow/wm/frame_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/wm_flow/embedded/embedded.cc
diff --git a/examples/wm_flow/embedded/embedded.cc b/examples/wm_flow/embedded/embedded.cc
index 912a3b914979ee5b7734e7dde745c45a49c0fa76..b2a2bd041c0604e7eba4f2bacb07321ee97d8900 100644
--- a/examples/wm_flow/embedded/embedded.cc
+++ b/examples/wm_flow/embedded/embedded.cc
@@ -67,9 +67,16 @@ class WMFlowEmbedded : public mojo::ApplicationDelegate,
scoped_ptr<mojo::ServiceProvider> imported_services) override {
bitmap_uploader_.reset(new mojo::BitmapUploader(root));
bitmap_uploader_->Init(shell_);
+ // BitmapUploader does not track view size changes, we would
+ // need to subscribe to OnViewBoundsChanged and tell the bitmap uploader
+ // to invalidate itself. This is better done once if had a per-view
+ // object instead of holding per-view state on the ApplicationDelegate.
bitmap_uploader_->SetColor(SK_ColorMAGENTA);
exported_services->AddService(&embeddee_factory_);
+ // FIXME: embedder_ is wrong for the same reason the embedee_ storage is
+ // wrong in app.cc. We need separate per-instance storage not on the
+ // application delegate.
mojo::ConnectToService(imported_services.get(), &embedder_);
embedder_->HelloWorld(base::Bind(&WMFlowEmbedded::HelloWorldAck,
base::Unretained(this)));
« no previous file with comments | « examples/wm_flow/app/app.cc ('k') | examples/wm_flow/wm/frame_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698