Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_android.h |
| diff --git a/content/browser/frame_host/render_frame_host_android.h b/content/browser/frame_host/render_frame_host_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e1b73a9d4799aac5630d5dd01cdc6f7428152c2f |
| --- /dev/null |
| +++ b/content/browser/frame_host/render_frame_host_android.h |
| @@ -0,0 +1,54 @@ |
| +// Copyright 2017 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_FRAME_HOST_ANDROID_H_ |
| +#define CONTENT_BROWSER_FRAME_HOST_ANDROID_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include <memory> |
| + |
| +#include "base/android/jni_android.h" |
| +#include "base/android/jni_weak_ref.h" |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/compiler_specific.h" |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
|
boliu
2017/03/06 23:12:38
remove
rwlbuis
2017/03/07 19:44:55
Done.
|
| +#include "base/supports_user_data.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +class RenderFrameHostImpl; |
| + |
| +// Android wrapper around RenderFrameHost that provides safer passage from java |
| +// and back to native and provides java with a means of communicating with its |
| +// native counterpart. |
| +class CONTENT_EXPORT RenderFrameHostAndroid |
|
boliu
2017/03/06 23:12:38
missed this last time, probably doesn't need to be
rwlbuis
2017/03/07 19:44:55
Done.
|
| + : public base::SupportsUserData::Data { |
| + public: |
| + static bool Register(JNIEnv* env); |
| + |
| + explicit RenderFrameHostAndroid(RenderFrameHostImpl* render_frame_host); |
| + ~RenderFrameHostAndroid() override; |
| + |
| + RenderFrameHostImpl* render_frame_host() const { return render_frame_host_; } |
|
boliu
2017/03/06 23:12:38
unused as in remove it
rwlbuis
2017/03/07 19:44:55
Done.
|
| + |
| + base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
| + |
| + // Methods called from Java |
| + base::android::ScopedJavaLocalRef<jstring> GetLastCommittedURL( |
| + JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>&) const; |
| + |
| + private: |
| + RenderFrameHostImpl* const render_frame_host_; |
| + JavaObjectWeakGlobalRef obj_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RenderFrameHostAndroid); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_FRAME_HOST_ANDROID_H_ |