Chromium Code Reviews| Index: content/browser/android/load_url_params.cc |
| diff --git a/content/browser/android/load_url_params.cc b/content/browser/android/load_url_params.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..00867310cfa375e07b1fb8388948d92c52448615 |
| --- /dev/null |
| +++ b/content/browser/android/load_url_params.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/browser/android/load_url_params.h" |
| + |
| +#include <jni.h> |
| + |
| +#include "content/public/browser/navigation_controller.h" |
| +#include "jni/LoadUrlParams_jni.h" |
| + |
| +namespace { |
| + |
| +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
|
| + |
| +void RegisterConstants(JNIEnv* env) { |
| + Java_LoadUrlParams_initializeConstants(env, |
| + NavigationController::LOAD_TYPE_DEFAULT, |
| + NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST, |
| + NavigationController::LOAD_TYPE_DATA, |
| + NavigationController::UA_OVERRIDE_INHERIT, |
| + NavigationController::UA_OVERRIDE_FALSE, |
| + NavigationController::UA_OVERRIDE_TRUE); |
| +} |
| + |
| +} // namespace |
| + |
| +namespace content { |
| + |
| +bool RegisterLoadUrlParams(JNIEnv* env) { |
| + if (!RegisterNativesImpl(env)) |
| + return false; |
| + RegisterConstants(env); |
| + return true; |
| +} |
| + |
| +} // namespace content |