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

Unified Diff: content/browser/android/load_url_params.cc

Issue 10823207: Consolidate ContentViewCore::Load* functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@cleanup_load
Patch Set: Split up nativeLoadUrl parameters and get rid of most of jni code. Moved android_load_url_params. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
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;
+
+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

Powered by Google App Engine
This is Rietveld 408576698