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/bindings/allocation_scope.h" | 6 #include "mojo/public/cpp/bindings/allocation_scope.h" |
7 #include "mojo/public/cpp/bindings/remote_ptr.h" | 7 #include "mojo/public/cpp/bindings/remote_ptr.h" |
8 #include "mojo/public/cpp/environment/environment.h" | 8 #include "mojo/public/cpp/environment/environment.h" |
9 #include "mojo/public/cpp/shell/application.h" | 9 #include "mojo/public/cpp/shell/application.h" |
10 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 // ViewManagerClient:: | 46 // ViewManagerClient:: |
47 virtual void OnConnectionEstablished(uint16_t connection_id) OVERRIDE { | 47 virtual void OnConnectionEstablished(uint16_t connection_id) OVERRIDE { |
48 } | 48 } |
49 virtual void OnNodeHierarchyChanged(uint32_t node, | 49 virtual void OnNodeHierarchyChanged(uint32_t node, |
50 uint32_t new_parent, | 50 uint32_t new_parent, |
51 uint32_t old_parent, | 51 uint32_t old_parent, |
52 int32_t change_id) OVERRIDE { | 52 int32_t change_id) OVERRIDE { |
53 } | 53 } |
| 54 virtual void OnNodeViewChanged(uint32_t node, |
| 55 uint32_t old_view_id, |
| 56 uint32_t new_view_id, |
| 57 int32_t change_id) OVERRIDE { |
| 58 } |
54 | 59 |
55 private: | 60 private: |
56 void OnCreatedView(bool success) { | 61 void OnCreatedView(bool success) { |
57 DCHECK(success); | 62 DCHECK(success); |
58 } | 63 } |
59 | 64 |
60 RemotePtr<services::view_manager::ViewManager> view_manager_; | 65 RemotePtr<services::view_manager::ViewManager> view_manager_; |
61 }; | 66 }; |
62 | 67 |
63 } // namespace examples | 68 } // namespace examples |
64 } // namespace mojo | 69 } // namespace mojo |
65 | 70 |
66 extern "C" SAMPLE_APP_EXPORT MojoResult CDECL MojoMain( | 71 extern "C" SAMPLE_APP_EXPORT MojoResult CDECL MojoMain( |
67 MojoHandle shell_handle) { | 72 MojoHandle shell_handle) { |
68 mojo::Environment env; | 73 mojo::Environment env; |
69 mojo::RunLoop loop; | 74 mojo::RunLoop loop; |
70 | 75 |
71 mojo::examples::SampleApp app(shell_handle); | 76 mojo::examples::SampleApp app(shell_handle); |
72 loop.Run(); | 77 loop.Run(); |
73 return MOJO_RESULT_OK; | 78 return MOJO_RESULT_OK; |
74 } | 79 } |
OLD | NEW |