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

Unified Diff: content/browser/android/content_view_client.h

Issue 10963041: Revert "Revert 158067 - Remove native side of content_view_client" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add additional_input_paths as a variable and input to java.gypi Created 8 years, 3 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
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/android/content_view_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_client.h
diff --git a/content/browser/android/content_view_client.h b/content/browser/android/content_view_client.h
deleted file mode 100644
index b28915e710f6d0f27b9913f6b060f62a8d3dc6b3..0000000000000000000000000000000000000000
--- a/content/browser/android/content_view_client.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// 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.
-
-#ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CLIENT_H_
-#define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CLIENT_H_
-
-#include "base/android/jni_helper.h"
-#include "base/compiler_specific.h"
-#include "content/public/browser/native_web_keyboard_event.h"
-#include "content/public/common/referrer.h"
-#include "googleurl/src/gurl.h"
-#include "net/base/net_errors.h"
-
-namespace content {
-
-class DownloadItem;
-class JavaScriptDialogCreator;
-struct NativeWebKeyboardEvent;
-class RenderViewHost;
-class WebContents;
-
-// These enums must be kept in sync with ContentViewClient.java
-enum ContentViewClientError {
- // Success
- CONTENT_VIEW_CLIENT_ERROR_OK = 0,
- // Generic error
- CONTENT_VIEW_CLIENT_ERROR_UNKNOWN = -1,
- // Server or proxy hostname lookup failed
- CONTENT_VIEW_CLIENT_ERROR_HOST_LOOKUP = -2,
- // Unsupported authentication scheme (not basic or digest)
- CONTENT_VIEW_CLIENT_ERROR_UNSUPPORTED_AUTH_SCHEME = -3,
- // User authentication failed on server
- CONTENT_VIEW_CLIENT_ERROR_AUTHENTICATION = -4,
- // User authentication failed on proxy
- CONTENT_VIEW_CLIENT_ERROR_PROXY_AUTHENTICATION = -5,
- // Failed to connect to the server
- CONTENT_VIEW_CLIENT_ERROR_CONNECT = -6,
- // Failed to read or write to the server
- CONTENT_VIEW_CLIENT_ERROR_IO = -7,
- // Connection timed out
- CONTENT_VIEW_CLIENT_ERROR_TIMEOUT = -8,
- // Too many redirects
- CONTENT_VIEW_CLIENT_ERROR_REDIRECT_LOOP = -9,
- // Unsupported URI scheme
- CONTENT_VIEW_CLIENT_ERROR_UNSUPPORTED_SCHEME = -10,
- // Failed to perform SSL handshake
- CONTENT_VIEW_CLIENT_ERROR_FAILED_SSL_HANDSHAKE = -11,
- // Malformed URL
- CONTENT_VIEW_CLIENT_ERROR_BAD_URL = -12,
- // Generic file error
- CONTENT_VIEW_CLIENT_ERROR_FILE = -13,
- // File not found
- CONTENT_VIEW_CLIENT_ERROR_FILE_NOT_FOUND = -14,
- // Too many requests during this load
- CONTENT_VIEW_CLIENT_ERROR_TOO_MANY_REQUESTS = -15,
-};
-
-// Native mirror of ContentViewClient.java. Used as a client of
-// ContentView, the main FrameLayout on Android.
-// TODO(joth): Delete this C++ class, to make it Java-only. All the callbacks
-// defined here originate in WebContentsObserver; we should have a dedicated
-// bridge class for that rather than overloading ContentViewClient with this.
-// See http://crbug.com/137967
-class ContentViewClient {
- public:
- ContentViewClient(JNIEnv* env, jobject obj);
- ~ContentViewClient();
-
- static ContentViewClient* CreateNativeContentViewClient(JNIEnv* env,
- jobject obj);
-
- // Called by ContentView:
- void OnPageStarted(const GURL& url);
- void OnPageFinished(const GURL& url);
- void OnLoadStarted();
- void OnLoadStopped();
- void OnReceivedError(int error_code,
- const string16& description,
- const GURL& url);
- void OnDidCommitMainFrame(const GURL& url,
- const GURL& base_url);
- void OnInterstitialShown();
- void OnInterstitialHidden();
-
- private:
- // Get the closest ContentViewClient match to the given Chrome error code.
- static ContentViewClientError ToContentViewClientError(int net_error);
-
- // We depend on ContentView.java to hold a ref to the client object. If we
- // were to hold a hard ref from native we could end up with a cyclic
- // ownership leak (the GC can't collect cycles if part of the cycle is caused
- // by native).
- JavaObjectWeakGlobalRef weak_java_client_;
-};
-
-bool RegisterContentViewClient(JNIEnv* env);
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CLIENT_H_
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/android/content_view_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698