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

Side by Side Diff: examples/sky_compositor_app/sky_compositor_app.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 unified diff | Download patch
« no previous file with comments | « examples/recipes/window_manager/main.cc ('k') | examples/window_manager/window_manager.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "mojo/application/application_runner_chromium.h" 6 #include "mojo/application/application_runner_chromium.h"
7 #include "mojo/public/c/system/main.h" 7 #include "mojo/public/c/system/main.h"
8 #include "mojo/public/cpp/application/application_connection.h" 8 #include "mojo/public/cpp/application/application_connection.h"
9 #include "mojo/public/cpp/application/application_delegate.h" 9 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/application_impl.h" 10 #include "mojo/public/cpp/application/application_impl.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 sky::DisplayDelegate::setDisplayDelegateCreateFunction( 45 sky::DisplayDelegate::setDisplayDelegateCreateFunction(
46 sky::DisplayDelegateGanesh::create); 46 sky::DisplayDelegateGanesh::create);
47 } 47 }
48 48
49 bool ConfigureIncomingConnection( 49 bool ConfigureIncomingConnection(
50 mojo::ApplicationConnection* connection) override { 50 mojo::ApplicationConnection* connection) override {
51 connection->AddService(view_manager_client_factory_.get()); 51 connection->AddService(view_manager_client_factory_.get());
52 return true; 52 return true;
53 } 53 }
54 54
55 void OnEmbed(mojo::ViewManager* view_manager, 55 void OnEmbed(mojo::View* root,
56 mojo::View* root,
57 mojo::ServiceProviderImpl* exported_services, 56 mojo::ServiceProviderImpl* exported_services,
58 scoped_ptr<mojo::ServiceProvider> imported_services) override { 57 scoped_ptr<mojo::ServiceProvider> imported_services) override {
59 view_ = root; 58 view_ = root;
60 base_time_ = base::TimeTicks::Now(); 59 base_time_ = base::TimeTicks::Now();
61 60
62 layer_host_.reset(new sky::LayerHost(this)); 61 layer_host_.reset(new sky::LayerHost(this));
63 root_layer_ = make_scoped_refptr(new sky::Layer(this)); 62 root_layer_ = make_scoped_refptr(new sky::Layer(this));
64 layer_host_->SetRootLayer(root_layer_); 63 layer_host_->SetRootLayer(root_layer_);
65 layer_host_->SetNeedsAnimate(); 64 layer_host_->SetNeedsAnimate();
66 } 65 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 107
109 DISALLOW_COPY_AND_ASSIGN(SkyCompositorApp); 108 DISALLOW_COPY_AND_ASSIGN(SkyCompositorApp);
110 }; 109 };
111 110
112 } // namespace examples 111 } // namespace examples
113 112
114 MojoResult MojoMain(MojoHandle handle) { 113 MojoResult MojoMain(MojoHandle handle) {
115 mojo::ApplicationRunnerChromium runner(new examples::SkyCompositorApp); 114 mojo::ApplicationRunnerChromium runner(new examples::SkyCompositorApp);
116 return runner.Run(handle); 115 return runner.Run(handle);
117 } 116 }
OLDNEW
« no previous file with comments | « examples/recipes/window_manager/main.cc ('k') | examples/window_manager/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698