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

Side by Side Diff: blimp/client/core/android/blimp_jni_registrar.cc

Issue 2132163002: Add BlimpClientContext and factory with real and dummy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-blimp-client-core-public-to-blimp-client
Patch Set: git merge origin/master before CQ for good measure Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/client/app/android/blimp_jni_registrar.h" 5 #include "blimp/client/public/android/blimp_jni_registrar.h"
6 6
7 #include "base/android/jni_registrar.h" 7 #include "base/android/jni_registrar.h"
8 #include "blimp/client/app/android/blimp_client_session_android.h" 8 #include "blimp/client/core/android/blimp_client_context_impl_android.h"
9 #include "blimp/client/app/android/blimp_library_loader.h"
10 #include "blimp/client/app/android/blimp_view.h"
11 #include "blimp/client/app/android/tab_control_feature_android.h"
12 #include "blimp/client/app/android/toolbar.h"
13 #include "blimp/client/app/android/web_input_box.h"
14 #include "blimp/client/core/android/blimp_contents_factory.h" 9 #include "blimp/client/core/android/blimp_contents_factory.h"
15 #include "blimp/client/core/android/blimp_contents_impl_android.h" 10 #include "blimp/client/core/android/blimp_contents_impl_android.h"
16 #include "blimp/client/core/android/blimp_contents_observer_proxy.h" 11 #include "blimp/client/core/android/blimp_contents_observer_proxy.h"
17 #include "blimp/client/core/android/blimp_navigation_controller_impl_android.h" 12 #include "blimp/client/core/android/blimp_navigation_controller_impl_android.h"
18 #include "components/safe_json/android/component_jni_registrar.h"
19 13
20 namespace blimp { 14 namespace blimp {
21 namespace client { 15 namespace client {
22 namespace { 16 namespace {
23 17
24 base::android::RegistrationMethod kBlimpRegistrationMethods[] = { 18 base::android::RegistrationMethod kBlimpRegistrationMethods[] = {
25 {"BlimpClientSessionAndroid", BlimpClientSessionAndroid::RegisterJni}, 19 {"BlimpClientContextImplAndroid",
20 BlimpClientContextImplAndroid::RegisterJni},
26 {"BlimpContentsFactory", RegisterBlimpContentsFactoryJni}, 21 {"BlimpContentsFactory", RegisterBlimpContentsFactoryJni},
27 {"BlimpContentsImpl", BlimpContentsImplAndroid::RegisterJni}, 22 {"BlimpContentsImplAndroid", BlimpContentsImplAndroid::RegisterJni},
28 {"BlimpContentsObserverProxy", BlimpContentsObserverProxy::RegisterJni}, 23 {"BlimpContentsObserverProxy", BlimpContentsObserverProxy::RegisterJni},
29 {"BlimpLibraryLoader", RegisterBlimpLibraryLoaderJni},
30 {"BlimpNavigationControllerImplAndroid", 24 {"BlimpNavigationControllerImplAndroid",
31 BlimpNavigationControllerImplAndroid::RegisterJni}, 25 BlimpNavigationControllerImplAndroid::RegisterJni},
32 {"BlimpView", BlimpView::RegisterJni},
33 {"SafeJson", safe_json::android::RegisterSafeJsonJni},
34 {"TabControlFeatureAndroid", TabControlFeatureAndroid::RegisterJni},
35 {"Toolbar", Toolbar::RegisterJni},
36 {"WebInputBox", WebInputBox::RegisterJni},
37 }; 26 };
38 27
39 } // namespace 28 } // namespace
40 29
30 // This method is declared in
31 // //blimp/client/public/android/blimp_jni_registrar.h, and either this function
32 // or the one in //blimp/client/core/android/dummy_blimp_jni_registrar.cc
33 // should be linked in to any binary blimp::client::RegisterBlimpJni.
41 bool RegisterBlimpJni(JNIEnv* env) { 34 bool RegisterBlimpJni(JNIEnv* env) {
42 return base::android::RegisterNativeMethods( 35 return base::android::RegisterNativeMethods(
43 env, kBlimpRegistrationMethods, arraysize(kBlimpRegistrationMethods)); 36 env, kBlimpRegistrationMethods, arraysize(kBlimpRegistrationMethods));
44 } 37 }
45 38
46 } // namespace client 39 } // namespace client
47 } // namespace blimp 40 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698