OLD | NEW |
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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) | 73 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) |
74 MOJO_OVERRIDE { | 74 MOJO_OVERRIDE { |
75 connection->AddService(&view_manager_client_factory_); | 75 connection->AddService(&view_manager_client_factory_); |
76 connection->AddService(&navigator_factory_); | 76 connection->AddService(&navigator_factory_); |
77 return true; | 77 return true; |
78 } | 78 } |
79 | 79 |
80 // Overridden from ViewManagerDelegate: | 80 // Overridden from ViewManagerDelegate: |
81 virtual void OnEmbed(ViewManager* view_manager, Node* root) OVERRIDE { | 81 virtual void OnEmbed(ViewManager* view_manager, |
| 82 Node* root, |
| 83 ServiceProviderImpl* exported_services, |
| 84 scoped_ptr<ServiceProvider> imported_services) OVERRIDE { |
82 View* view = View::Create(view_manager); | 85 View* view = View::Create(view_manager); |
83 view->AddObserver(this); | 86 view->AddObserver(this); |
84 root->SetActiveView(view); | 87 root->SetActiveView(view); |
85 root->AddObserver(this); | 88 root->AddObserver(this); |
86 | 89 |
87 roots_[root->id()] = root; | 90 roots_[root->id()] = root; |
88 ProcessPendingNodeColor(root->id()); | 91 ProcessPendingNodeColor(root->id()); |
89 } | 92 } |
90 virtual void OnViewManagerDisconnected(ViewManager* view_manager) OVERRIDE { | 93 virtual void OnViewManagerDisconnected(ViewManager* view_manager) OVERRIDE { |
91 base::MessageLoop::current()->Quit(); | 94 base::MessageLoop::current()->Quit(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 172 } |
170 | 173 |
171 } // namespace examples | 174 } // namespace examples |
172 | 175 |
173 // static | 176 // static |
174 ApplicationDelegate* ApplicationDelegate::Create() { | 177 ApplicationDelegate* ApplicationDelegate::Create() { |
175 return new examples::EmbeddedApp; | 178 return new examples::EmbeddedApp; |
176 } | 179 } |
177 | 180 |
178 } // namespace mojo | 181 } // namespace mojo |
OLD | NEW |