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 "shell/native_application_support.h" | 5 #include "shell/native_application_support.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
" | 10 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 init_go_runtime(); | 111 init_go_runtime(); |
112 } | 112 } |
113 | 113 |
114 typedef MojoResult (*MojoMainFunction)(MojoHandle); | 114 typedef MojoResult (*MojoMainFunction)(MojoHandle); |
115 MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>( | 115 MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>( |
116 base::GetFunctionPointerFromNativeLibrary(app_library, "MojoMain")); | 116 base::GetFunctionPointerFromNativeLibrary(app_library, "MojoMain")); |
117 if (!main_function) { | 117 if (!main_function) { |
118 LOG(ERROR) << "MojoMain not found"; | 118 LOG(ERROR) << "MojoMain not found"; |
119 return false; | 119 return false; |
120 } | 120 } |
121 // |MojoMain()| takes ownership of the service handle. | 121 // |MojoMain()| takes ownership of the Application request handle. |
122 MojoHandle handle = application_request.PassMessagePipe().release().value(); | 122 MojoHandle handle = application_request.PassMessagePipe().release().value(); |
123 MojoResult result = main_function(handle); | 123 MojoResult result = main_function(handle); |
124 LOG_IF(ERROR, result != MOJO_RESULT_OK) | 124 LOG_IF(ERROR, result != MOJO_RESULT_OK) |
125 << "MojoMain returned error (result: " << result << ")"; | 125 << "MojoMain returned error (result: " << result << ")"; |
126 return true; | 126 return true; |
127 } | 127 } |
128 | 128 |
129 } // namespace shell | 129 } // namespace shell |
OLD | NEW |