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

Unified Diff: mojo/examples/aura_demo/aura_demo.cc

Issue 514063003: Update view_manager and window_manager to make use of content handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@viewman2
Patch Set: git cl format Created 6 years, 3 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 | « no previous file | mojo/examples/browser/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/aura_demo/aura_demo.cc
diff --git a/mojo/examples/aura_demo/aura_demo.cc b/mojo/examples/aura_demo/aura_demo.cc
index d268ec2e30a079c9c9e5d4e5ee1528e137a5d8bf..e49d1f5025a8f56ce366aa7be4492f1cf1b77961 100644
--- a/mojo/examples/aura_demo/aura_demo.cc
+++ b/mojo/examples/aura_demo/aura_demo.cc
@@ -13,6 +13,7 @@
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/application_runner_chromium.h"
#include "mojo/public/cpp/system/core.h"
#include "mojo/services/public/cpp/view_manager/view.h"
@@ -109,11 +110,7 @@ class AuraDemo : public ApplicationDelegate,
public WindowTreeHostMojoDelegate,
public ViewManagerDelegate {
public:
- AuraDemo()
- : window1_(NULL),
- window2_(NULL),
- window21_(NULL),
- view_manager_client_factory_(this) {}
+ AuraDemo() : window1_(NULL), window2_(NULL), window21_(NULL) {}
virtual ~AuraDemo() {}
private:
@@ -165,6 +162,8 @@ class AuraDemo : public ApplicationDelegate,
}
virtual void Initialize(ApplicationImpl* app) MOJO_OVERRIDE {
+ view_manager_client_factory_.reset(
+ new ViewManagerClientFactory(app->shell(), this));
aura::Env::CreateInstance(true);
context_factory_.reset(new ContextFactoryMojo);
aura::Env::GetInstance()->set_context_factory(context_factory_.get());
@@ -174,7 +173,7 @@ class AuraDemo : public ApplicationDelegate,
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
MOJO_OVERRIDE {
- connection->AddService(&view_manager_client_factory_);
+ connection->AddService(view_manager_client_factory_.get());
return true;
}
@@ -194,7 +193,7 @@ class AuraDemo : public ApplicationDelegate,
View* root_;
- ViewManagerClientFactory view_manager_client_factory_;
+ scoped_ptr<ViewManagerClientFactory> view_manager_client_factory_;
scoped_ptr<aura::WindowTreeHost> window_tree_host_;
« no previous file with comments | « no previous file | mojo/examples/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698