| Index: chrome/browser/android/tab_android.h
|
| diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
|
| index ae6bdce6ea50c35655855c9e60892ab7931bec42..cc2cd868e25b356248c61d3b76b086ef8c76eb7a 100644
|
| --- a/chrome/browser/android/tab_android.h
|
| +++ b/chrome/browser/android/tab_android.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/android/scoped_java_ref.h"
|
| #include "base/callback_forward.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/strings/string16.h"
|
| #include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
|
| #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
|
| @@ -23,6 +24,9 @@
|
| #include "components/toolbar/toolbar_model.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| +#include "content/public/browser/web_contents_observer.h"
|
| +#include "services/service_manager/public/cpp/binder_registry.h"
|
| +#include "third_party/WebKit/public/platform/media_download_in_product_help.mojom.h"
|
|
|
| class GURL;
|
| class Profile;
|
| @@ -51,7 +55,8 @@ class PrerenderManager;
|
|
|
| class TabAndroid : public CoreTabHelperDelegate,
|
| public content::NotificationObserver,
|
| - public favicon::FaviconDriverObserver {
|
| + public favicon::FaviconDriverObserver,
|
| + public content::WebContentsObserver {
|
| public:
|
| // A Java counterpart will be generated for this enum.
|
| // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
|
| @@ -253,6 +258,10 @@ class TabAndroid : public CoreTabHelperDelegate,
|
| const base::android::JavaParamRef<jobject>& obj,
|
| jboolean enabled);
|
|
|
| + void MediaDownloadInProductHelpDismissed(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& obj);
|
| +
|
| bool ShouldEnableEmbeddedMediaExperience() const;
|
|
|
| scoped_refptr<content::DevToolsAgentHost> GetDevToolsAgentHost();
|
| @@ -265,9 +274,24 @@ class TabAndroid : public CoreTabHelperDelegate,
|
| // Register the Tab's native methods through JNI.
|
| static bool RegisterTabAndroid(JNIEnv* env);
|
|
|
| + // content::WebContents implementation.
|
| + void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
| + void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
| +
|
| private:
|
| + class MediaDownloadInProductHelp;
|
| +
|
| prerender::PrerenderManager* GetPrerenderManager() const;
|
|
|
| + // methods used by MediaDownloadInProductHelp.
|
| + void CreateInProductHelpService(
|
| + content::RenderFrameHost* render_frame_host,
|
| + const service_manager::BindSourceInfo& source_info,
|
| + blink::mojom::MediaDownloadInProductHelpRequest request);
|
| + void ShowMediaDownloadInProductHelp(const gfx::Rect& rect_in_frame);
|
| + void DismissMediaDownloadInProductHelp();
|
| + void OnMediaDownloadInProductHelpConnectionError();
|
| +
|
| JavaObjectWeakGlobalRef weak_java_tab_;
|
|
|
| // The identifier used by session restore for this tab.
|
| @@ -290,6 +314,10 @@ class TabAndroid : public CoreTabHelperDelegate,
|
| std::string webapp_manifest_scope_;
|
| bool embedded_media_experience_enabled_;
|
|
|
| + std::unique_ptr<MediaDownloadInProductHelp> media_in_product_help_;
|
| +
|
| + base::WeakPtrFactory<TabAndroid> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TabAndroid);
|
| };
|
|
|
|
|