Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: shell/native_application_support.cc

Issue 1052723003: NaCl: create a separate namespace for Mojo handles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/core_system_thunks.h"
10 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h " 11 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h "
11 #include "mojo/public/platform/native/gles2_impl_chromium_sub_image_thunks.h" 12 #include "mojo/public/platform/native/gles2_impl_chromium_sub_image_thunks.h"
12 #include "mojo/public/platform/native/gles2_impl_chromium_sync_point_thunks.h" 13 #include "mojo/public/platform/native/gles2_impl_chromium_sync_point_thunks.h"
13 #include "mojo/public/platform/native/gles2_impl_chromium_texture_mailbox_thunks .h" 14 #include "mojo/public/platform/native/gles2_impl_chromium_texture_mailbox_thunks .h"
14 #include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h" 15 #include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h"
15 #include "mojo/public/platform/native/gles2_impl_thunks.h" 16 #include "mojo/public/platform/native/gles2_impl_thunks.h"
16 #include "mojo/public/platform/native/gles2_thunks.h" 17 #include "mojo/public/platform/native/gles2_thunks.h"
17 #include "mojo/public/platform/native/system_thunks.h" 18 #include "mojo/public/platform/native/system_thunks.h"
18 19
19 namespace mojo { 20 namespace mojo {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 InterfaceRequest<Application> application_request) { 60 InterfaceRequest<Application> application_request) {
60 // Tolerate |app_library| being null, to make life easier for callers. 61 // Tolerate |app_library| being null, to make life easier for callers.
61 if (!app_library) 62 if (!app_library)
62 return false; 63 return false;
63 64
64 if (!SetThunks(&MojoMakeSystemThunks, "MojoSetSystemThunks", app_library)) { 65 if (!SetThunks(&MojoMakeSystemThunks, "MojoSetSystemThunks", app_library)) {
65 LOG(ERROR) << "MojoSetSystemThunks not found"; 66 LOG(ERROR) << "MojoSetSystemThunks not found";
66 return false; 67 return false;
67 } 68 }
68 69
70 // TODO(ncbray): make this interface private, somehow?
71 SetThunks(&MojoMakeCoreSystemThunks, "MojoSetCoreSystemThunks", app_library);
72
69 if (SetThunks(&MojoMakeGLES2ControlThunks, "MojoSetGLES2ControlThunks", 73 if (SetThunks(&MojoMakeGLES2ControlThunks, "MojoSetGLES2ControlThunks",
70 app_library)) { 74 app_library)) {
71 // If we have the control thunks, we should also have the GLES2 75 // If we have the control thunks, we should also have the GLES2
72 // implementation thunks. 76 // implementation thunks.
73 if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks", 77 if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks",
74 app_library)) { 78 app_library)) {
75 LOG(ERROR) 79 LOG(ERROR)
76 << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks"; 80 << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks";
77 return false; 81 return false;
78 } 82 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 MojoHandle handle = application_request.PassMessagePipe().release().value(); 119 MojoHandle handle = application_request.PassMessagePipe().release().value();
116 MojoResult result = main_function(handle); 120 MojoResult result = main_function(handle);
117 if (result < MOJO_RESULT_OK) { 121 if (result < MOJO_RESULT_OK) {
118 LOG(ERROR) << "MojoMain returned error (result: " << result << ")"; 122 LOG(ERROR) << "MojoMain returned error (result: " << result << ")";
119 } 123 }
120 return true; 124 return true;
121 } 125 }
122 126
123 } // namespace shell 127 } // namespace shell
124 } // namespace mojo 128 } // namespace mojo
OLDNEW
« nacl_bindings_generator/mojo_syscall.cc.tmpl ('K') | « services/nacl/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698