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

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

Issue 460863002: Rename Node to View in the View Manager mojom & client lib. Service TBD. (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 | « mojo/aura/window_tree_host_mojo.cc ('k') | mojo/examples/browser/browser.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"
11 #include "mojo/aura/window_tree_host_mojo.h" 11 #include "mojo/aura/window_tree_host_mojo.h"
12 #include "mojo/aura/window_tree_host_mojo_delegate.h" 12 #include "mojo/aura/window_tree_host_mojo_delegate.h"
13 #include "mojo/public/cpp/application/application_connection.h" 13 #include "mojo/public/cpp/application/application_connection.h"
14 #include "mojo/public/cpp/application/application_delegate.h" 14 #include "mojo/public/cpp/application/application_delegate.h"
15 #include "mojo/public/cpp/system/core.h" 15 #include "mojo/public/cpp/system/core.h"
16 #include "mojo/services/public/cpp/view_manager/node.h" 16 #include "mojo/services/public/cpp/view_manager/view.h"
17 #include "mojo/services/public/cpp/view_manager/view_manager.h" 17 #include "mojo/services/public/cpp/view_manager/view_manager.h"
18 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" 18 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
19 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 19 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
20 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h" 20 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h"
21 #include "ui/aura/client/default_capture_client.h" 21 #include "ui/aura/client/default_capture_client.h"
22 #include "ui/aura/client/window_tree_client.h" 22 #include "ui/aura/client/window_tree_client.h"
23 #include "ui/aura/env.h" 23 #include "ui/aura/env.h"
24 #include "ui/aura/window.h" 24 #include "ui/aura/window.h"
25 #include "ui/aura/window_delegate.h" 25 #include "ui/aura/window_delegate.h"
26 #include "ui/base/hit_test.h" 26 #include "ui/base/hit_test.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 AuraDemo() 110 AuraDemo()
111 : window1_(NULL), 111 : window1_(NULL),
112 window2_(NULL), 112 window2_(NULL),
113 window21_(NULL), 113 window21_(NULL),
114 view_manager_client_factory_(this) {} 114 view_manager_client_factory_(this) {}
115 virtual ~AuraDemo() {} 115 virtual ~AuraDemo() {}
116 116
117 private: 117 private:
118 // Overridden from ViewManagerDelegate: 118 // Overridden from ViewManagerDelegate:
119 virtual void OnEmbed(ViewManager* view_manager, 119 virtual void OnEmbed(ViewManager* view_manager,
120 Node* root, 120 View* root,
121 ServiceProviderImpl* exported_services, 121 ServiceProviderImpl* exported_services,
122 scoped_ptr<ServiceProvider> imported_services) OVERRIDE { 122 scoped_ptr<ServiceProvider> imported_services) OVERRIDE {
123 // TODO(beng): this function could be called multiple times! 123 // TODO(beng): this function could be called multiple times!
124 root_ = root; 124 root_ = root;
125 125
126 window_tree_host_.reset(new WindowTreeHostMojo(root, this)); 126 window_tree_host_.reset(new WindowTreeHostMojo(root, this));
127 window_tree_host_->InitHost(); 127 window_tree_host_->InitHost();
128 128
129 window_tree_client_.reset( 129 window_tree_client_.reset(
130 new DemoWindowTreeClient(window_tree_host_->window())); 130 new DemoWindowTreeClient(window_tree_host_->window()));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 scoped_ptr<ScreenMojo> screen_; 183 scoped_ptr<ScreenMojo> screen_;
184 184
185 scoped_ptr<DemoWindowDelegate> delegate1_; 185 scoped_ptr<DemoWindowDelegate> delegate1_;
186 scoped_ptr<DemoWindowDelegate> delegate2_; 186 scoped_ptr<DemoWindowDelegate> delegate2_;
187 scoped_ptr<DemoWindowDelegate> delegate21_; 187 scoped_ptr<DemoWindowDelegate> delegate21_;
188 188
189 aura::Window* window1_; 189 aura::Window* window1_;
190 aura::Window* window2_; 190 aura::Window* window2_;
191 aura::Window* window21_; 191 aura::Window* window21_;
192 192
193 Node* root_; 193 View* root_;
194 194
195 ViewManagerClientFactory view_manager_client_factory_; 195 ViewManagerClientFactory view_manager_client_factory_;
196 196
197 scoped_ptr<aura::WindowTreeHost> window_tree_host_; 197 scoped_ptr<aura::WindowTreeHost> window_tree_host_;
198 198
199 DISALLOW_COPY_AND_ASSIGN(AuraDemo); 199 DISALLOW_COPY_AND_ASSIGN(AuraDemo);
200 }; 200 };
201 201
202 } // namespace examples 202 } // namespace examples
203 203
204 // static 204 // static
205 ApplicationDelegate* ApplicationDelegate::Create() { 205 ApplicationDelegate* ApplicationDelegate::Create() {
206 return new examples::AuraDemo(); 206 return new examples::AuraDemo();
207 } 207 }
208 208
209 } // namespace mojo 209 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/aura/window_tree_host_mojo.cc ('k') | mojo/examples/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698