Commit da304441 authored by tfarina@chromium.org's avatar tfarina@chromium.org

components: Move web_contents_delegate_android into web_contents_delegate_android namespace.

BUG=238224
R=joi@chromium.org, joth@chromium.org, thestig@chromium.org

Review URL: https://codereview.chromium.org/16073002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202981 0039d316-1c4b-4281-b951-d872f2087c98
parent a9b08ccb
...@@ -16,7 +16,7 @@ static base::android::RegistrationMethod ...@@ -16,7 +16,7 @@ static base::android::RegistrationMethod
{ "NavigationInterception", { "NavigationInterception",
navigation_interception::RegisterNavigationInterceptionJni }, navigation_interception::RegisterNavigationInterceptionJni },
{ "WebContentsDelegateAndroid", { "WebContentsDelegateAndroid",
components::RegisterWebContentsDelegateAndroidJni }, web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni },
}; };
// This is called by the VM when the shared library is first loaded. // This is called by the VM when the shared library is first loaded.
......
...@@ -15,7 +15,7 @@ namespace android_webview { ...@@ -15,7 +15,7 @@ namespace android_webview {
// Should contain WebContentsDelegate code required by WebView that should not // Should contain WebContentsDelegate code required by WebView that should not
// be part of the Chromium Android port. // be part of the Chromium Android port.
class AwWebContentsDelegate class AwWebContentsDelegate
: public components::WebContentsDelegateAndroid { : public web_contents_delegate_android::WebContentsDelegateAndroid {
public: public:
AwWebContentsDelegate(JNIEnv* env, jobject obj); AwWebContentsDelegate(JNIEnv* env, jobject obj);
virtual ~AwWebContentsDelegate(); virtual ~AwWebContentsDelegate();
......
...@@ -42,7 +42,7 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = { ...@@ -42,7 +42,7 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{ "NavigationInterception", { "NavigationInterception",
navigation_interception::RegisterNavigationInterceptionJni }, navigation_interception::RegisterNavigationInterceptionJni },
{ "WebContentsDelegateAndroid", { "WebContentsDelegateAndroid",
components::RegisterWebContentsDelegateAndroidJni }, web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni },
{ "RegisterAuxiliaryProfileLoader", autofill::RegisterAutofillAndroidJni }, { "RegisterAuxiliaryProfileLoader", autofill::RegisterAutofillAndroidJni },
// Register JNI for chrome classes. // Register JNI for chrome classes.
{ "ApplicationLifetime", RegisterApplicationLifetimeAndroid }, { "ApplicationLifetime", RegisterApplicationLifetimeAndroid },
......
...@@ -32,7 +32,7 @@ namespace android { ...@@ -32,7 +32,7 @@ namespace android {
// Should contain any WebContentsDelegate implementations required by // Should contain any WebContentsDelegate implementations required by
// the Chromium Android port but not to be shared with WebView. // the Chromium Android port but not to be shared with WebView.
class ChromeWebContentsDelegateAndroid class ChromeWebContentsDelegateAndroid
: public components::WebContentsDelegateAndroid, : public web_contents_delegate_android::WebContentsDelegateAndroid,
public content::NotificationObserver { public content::NotificationObserver {
public: public:
ChromeWebContentsDelegateAndroid(JNIEnv* env, jobject obj); ChromeWebContentsDelegateAndroid(JNIEnv* env, jobject obj);
......
...@@ -15,7 +15,7 @@ import org.chromium.ui.ColorPickerDialog; ...@@ -15,7 +15,7 @@ import org.chromium.ui.ColorPickerDialog;
* ColorChooserAndroid communicates with the java ColorPickerDialog and the * ColorChooserAndroid communicates with the java ColorPickerDialog and the
* native color_chooser_android.cc * native color_chooser_android.cc
*/ */
@JNINamespace("components") @JNINamespace("web_contents_delegate_android")
public class ColorChooserAndroid { public class ColorChooserAndroid {
private final ColorPickerDialog mDialog; private final ColorPickerDialog mDialog;
private final int mNativeColorChooserAndroid; private final int mNativeColorChooserAndroid;
......
...@@ -14,7 +14,7 @@ import org.chromium.content.browser.ContentViewCore; ...@@ -14,7 +14,7 @@ import org.chromium.content.browser.ContentViewCore;
/** /**
* Java peer of the native class of the same name. * Java peer of the native class of the same name.
*/ */
@JNINamespace("components") @JNINamespace("web_contents_delegate_android")
public class WebContentsDelegateAndroid { public class WebContentsDelegateAndroid {
// Equivalent of WebCore::WebConsoleMessage::LevelTip. // Equivalent of WebCore::WebConsoleMessage::LevelTip.
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "content/public/browser/web_contents_view.h" #include "content/public/browser/web_contents_view.h"
#include "jni/ColorChooserAndroid_jni.h" #include "jni/ColorChooserAndroid_jni.h"
namespace components { namespace web_contents_delegate_android {
ColorChooserAndroid::ColorChooserAndroid(content::WebContents* web_contents, ColorChooserAndroid::ColorChooserAndroid(content::WebContents* web_contents,
SkColor initial_color) SkColor initial_color)
...@@ -54,4 +54,4 @@ bool RegisterColorChooserAndroid(JNIEnv* env) { ...@@ -54,4 +54,4 @@ bool RegisterColorChooserAndroid(JNIEnv* env) {
return RegisterNativesImpl(env); return RegisterNativesImpl(env);
} }
} // namespace components } // namespace web_contents_delegate_android
...@@ -15,9 +15,9 @@ using base::android::ScopedJavaLocalRef; ...@@ -15,9 +15,9 @@ using base::android::ScopedJavaLocalRef;
namespace content { namespace content {
class WebContents; class WebContents;
} // namespace content }
namespace components { namespace web_contents_delegate_android {
// Glues the Java (ColorPickerChooser.java) picker with the native part. // Glues the Java (ColorPickerChooser.java) picker with the native part.
class ColorChooserAndroid : public content::ColorChooser { class ColorChooserAndroid : public content::ColorChooser {
...@@ -45,6 +45,6 @@ class ColorChooserAndroid : public content::ColorChooser { ...@@ -45,6 +45,6 @@ class ColorChooserAndroid : public content::ColorChooser {
// Native JNI methods // Native JNI methods
bool RegisterColorChooserAndroid(JNIEnv* env); bool RegisterColorChooserAndroid(JNIEnv* env);
} // namespace components } // namespace web_contents_delegate_android
#endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_COLOR_CHOOSER_ANDROID_H_ #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_COLOR_CHOOSER_ANDROID_H_
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "components/web_contents_delegate_android/color_chooser_android.h" #include "components/web_contents_delegate_android/color_chooser_android.h"
#include "components/web_contents_delegate_android/web_contents_delegate_android.h" #include "components/web_contents_delegate_android/web_contents_delegate_android.h"
namespace components { namespace web_contents_delegate_android {
static base::android::RegistrationMethod kComponentRegisteredMethods[] = { static base::android::RegistrationMethod kComponentRegisteredMethods[] = {
{ "ColorChooserAndroid", RegisterColorChooserAndroid }, { "ColorChooserAndroid", RegisterColorChooserAndroid },
...@@ -21,5 +21,5 @@ bool RegisterWebContentsDelegateAndroidJni(JNIEnv* env) { ...@@ -21,5 +21,5 @@ bool RegisterWebContentsDelegateAndroidJni(JNIEnv* env) {
kComponentRegisteredMethods, arraysize(kComponentRegisteredMethods)); kComponentRegisteredMethods, arraysize(kComponentRegisteredMethods));
} }
} // namespace components } // namespace web_contents_delegate_android
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
#include <jni.h> #include <jni.h>
namespace components { namespace web_contents_delegate_android {
// Register all JNI bindings necessary for the web_contents_delegate_android // Register all JNI bindings necessary for the web_contents_delegate_android
// component. // component.
bool RegisterWebContentsDelegateAndroidJni(JNIEnv* env); bool RegisterWebContentsDelegateAndroidJni(JNIEnv* env);
} // namespace components } // namespace web_contents_delegate_android
#endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_COMPONENT_JNI_REGISTRAR_H_ #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_COMPONENT_JNI_REGISTRAR_H_
...@@ -32,7 +32,7 @@ using content::ColorChooser; ...@@ -32,7 +32,7 @@ using content::ColorChooser;
using content::WebContents; using content::WebContents;
using content::WebContentsDelegate; using content::WebContentsDelegate;
namespace components { namespace web_contents_delegate_android {
WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj) WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj)
: weak_java_delegate_(env, obj) { : weak_java_delegate_(env, obj) {
...@@ -339,4 +339,4 @@ bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { ...@@ -339,4 +339,4 @@ bool RegisterWebContentsDelegateAndroid(JNIEnv* env) {
return RegisterNativesImpl(env); return RegisterNativesImpl(env);
} }
} // namespace components } // namespace web_contents_delegate_android
...@@ -19,9 +19,9 @@ class WebContents; ...@@ -19,9 +19,9 @@ class WebContents;
class WebContentsDelegate; class WebContentsDelegate;
struct NativeWebKeyboardEvent; struct NativeWebKeyboardEvent;
struct OpenURLParams; struct OpenURLParams;
} // namespace content }
namespace components { namespace web_contents_delegate_android {
enum WebContentsDelegateLogLevel { enum WebContentsDelegateLogLevel {
// Equivalent of WebCore::WebConsoleMessage::LevelDebug. // Equivalent of WebCore::WebConsoleMessage::LevelDebug.
...@@ -107,6 +107,6 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { ...@@ -107,6 +107,6 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
bool RegisterWebContentsDelegateAndroid(JNIEnv* env); bool RegisterWebContentsDelegateAndroid(JNIEnv* env);
} // namespace components } // namespace web_contents_delegate_android
#endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROID_H_ #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROID_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment