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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 virtual ~SampleApp() { | 43 virtual ~SampleApp() { |
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 uint32_t change_id) OVERRIDE { | 52 int32_t change_id) OVERRIDE { |
53 } | 53 } |
54 virtual void OnNodeViewReplaced(uint32_t node, | 54 virtual void OnNodeViewReplaced(uint32_t node, |
55 uint32_t old_view_id, | 55 uint32_t old_view_id, |
56 uint32_t new_view_id, | 56 uint32_t new_view_id, |
57 uint32_t change_id) OVERRIDE { | 57 int32_t change_id) OVERRIDE { |
58 } | 58 } |
59 | 59 |
60 private: | 60 private: |
61 void OnCreatedView(bool success) { | 61 void OnCreatedView(bool success) { |
62 DCHECK(success); | 62 DCHECK(success); |
63 } | 63 } |
64 | 64 |
65 RemotePtr<services::view_manager::ViewManager> view_manager_; | 65 RemotePtr<services::view_manager::ViewManager> view_manager_; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace examples | 68 } // namespace examples |
69 } // namespace mojo | 69 } // namespace mojo |
70 | 70 |
71 extern "C" SAMPLE_APP_EXPORT MojoResult CDECL MojoMain( | 71 extern "C" SAMPLE_APP_EXPORT MojoResult CDECL MojoMain( |
72 MojoHandle shell_handle) { | 72 MojoHandle shell_handle) { |
73 mojo::Environment env; | 73 mojo::Environment env; |
74 mojo::RunLoop loop; | 74 mojo::RunLoop loop; |
75 | 75 |
76 mojo::examples::SampleApp app(shell_handle); | 76 mojo::examples::SampleApp app(shell_handle); |
77 loop.Run(); | 77 loop.Run(); |
78 return MOJO_RESULT_OK; | 78 return MOJO_RESULT_OK; |
79 } | 79 } |
OLD | NEW |