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

Side by Side Diff: mojo/examples/aura_demo/aura_demo.cc

Issue 433513005: Pass ServiceProvider thru ViewManagerService::Embed() allowing embedder & embeddee to expose servic… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/examples/aura_demo/view_manager_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "mojo/aura/context_factory_mojo.h" 9 #include "mojo/aura/context_factory_mojo.h"
10 #include "mojo/aura/screen_mojo.h" 10 #include "mojo/aura/screen_mojo.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 AuraDemo() 111 AuraDemo()
112 : window1_(NULL), 112 : window1_(NULL),
113 window2_(NULL), 113 window2_(NULL),
114 window21_(NULL), 114 window21_(NULL),
115 view_(NULL), 115 view_(NULL),
116 view_manager_client_factory_(this) {} 116 view_manager_client_factory_(this) {}
117 virtual ~AuraDemo() {} 117 virtual ~AuraDemo() {}
118 118
119 private: 119 private:
120 // Overridden from ViewManagerDelegate: 120 // Overridden from ViewManagerDelegate:
121 virtual void OnEmbed(ViewManager* view_manager, Node* root) OVERRIDE { 121 virtual void OnEmbed(ViewManager* view_manager,
122 Node* root,
123 ServiceProviderImpl* exported_services,
124 scoped_ptr<ServiceProvider> imported_services) OVERRIDE {
122 // TODO(beng): this function could be called multiple times! 125 // TODO(beng): this function could be called multiple times!
123 view_ = View::Create(view_manager); 126 view_ = View::Create(view_manager);
124 root->SetActiveView(view_); 127 root->SetActiveView(view_);
125 128
126 window_tree_host_.reset(new WindowTreeHostMojo(root, this)); 129 window_tree_host_.reset(new WindowTreeHostMojo(root, this));
127 window_tree_host_->InitHost(); 130 window_tree_host_->InitHost();
128 131
129 window_tree_client_.reset( 132 window_tree_client_.reset(
130 new DemoWindowTreeClient(window_tree_host_->window())); 133 new DemoWindowTreeClient(window_tree_host_->window()));
131 134
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 }; 203 };
201 204
202 } // namespace examples 205 } // namespace examples
203 206
204 // static 207 // static
205 ApplicationDelegate* ApplicationDelegate::Create() { 208 ApplicationDelegate* ApplicationDelegate::Create() {
206 return new examples::AuraDemo(); 209 return new examples::AuraDemo();
207 } 210 }
208 211
209 } // namespace mojo 212 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/examples/aura_demo/view_manager_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698