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/bind.h" | 5 #include "base/bind.h" |
6 #include "mojo/public/cpp/application/application_delegate.h" | 6 #include "mojo/public/cpp/application/application_delegate.h" |
7 #include "mojo/public/cpp/application/application_impl.h" | 7 #include "mojo/public/cpp/application/application_impl.h" |
8 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 8 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
9 | 9 |
10 namespace examples { | 10 namespace examples { |
(...skipping 13 matching lines...) Expand all Loading... |
24 // Overridden from Application: | 24 // Overridden from Application: |
25 virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE { | 25 virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE { |
26 app->ConnectToService("mojo:mojo_view_manager", &view_manager_init_); | 26 app->ConnectToService("mojo:mojo_view_manager", &view_manager_init_); |
27 view_manager_init_->Embed("mojo:mojo_wm_flow_wm", | 27 view_manager_init_->Embed("mojo:mojo_wm_flow_wm", |
28 base::Bind(&ConnectCallback)); | 28 base::Bind(&ConnectCallback)); |
29 app->ConnectToApplication("mojo:mojo_wm_flow_app"); | 29 app->ConnectToApplication("mojo:mojo_wm_flow_app"); |
30 } | 30 } |
31 | 31 |
32 void OnConnect(bool success) {} | 32 void OnConnect(bool success) {} |
33 | 33 |
34 mojo::view_manager::ViewManagerInitServicePtr view_manager_init_; | 34 mojo::ViewManagerInitServicePtr view_manager_init_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(WMFlowInit); | 36 DISALLOW_COPY_AND_ASSIGN(WMFlowInit); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace examples | 39 } // namespace examples |
40 | 40 |
41 namespace mojo { | 41 namespace mojo { |
42 | 42 |
43 // static | 43 // static |
44 ApplicationDelegate* ApplicationDelegate::Create() { | 44 ApplicationDelegate* ApplicationDelegate::Create() { |
45 return new examples::WMFlowInit; | 45 return new examples::WMFlowInit; |
46 } | 46 } |
47 | 47 |
48 } // namespace | 48 } // namespace |
OLD | NEW |