OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/android/load_url_params.h" | |
6 | |
7 #include <jni.h> | |
8 | |
9 #include "content/public/browser/navigation_controller.h" | |
10 #include "jni/LoadUrlParams_jni.h" | |
11 | |
12 namespace { | |
13 | |
14 using content::NavigationController; | |
Yaron
2012/08/09 21:32:31
Why not just have this function in the content nam
boliu
2012/08/10 01:17:19
RegisterConstants is in the anonymous namespace so
| |
15 | |
16 void RegisterConstants(JNIEnv* env) { | |
17 Java_LoadUrlParams_initializeConstants(env, | |
18 NavigationController::LOAD_TYPE_DEFAULT, | |
19 NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST, | |
20 NavigationController::LOAD_TYPE_DATA, | |
21 NavigationController::UA_OVERRIDE_INHERIT, | |
22 NavigationController::UA_OVERRIDE_FALSE, | |
23 NavigationController::UA_OVERRIDE_TRUE); | |
24 } | |
25 | |
26 } // namespace | |
27 | |
28 namespace content { | |
29 | |
30 bool RegisterLoadUrlParams(JNIEnv* env) { | |
31 if (!RegisterNativesImpl(env)) | |
32 return false; | |
33 RegisterConstants(env); | |
34 return true; | |
35 } | |
36 | |
37 } // namespace content | |
OLD | NEW |