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

Unified Diff: chrome/browser/android/tab_android.h

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: Created 3 years, 6 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: chrome/browser/android/tab_android.h
diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
index 40390ee71210538220fd735af311cc3ec0e1f311..bc0d3b843f1aa790dea018c95a9aa956679ce61b 100644
--- a/chrome/browser/android/tab_android.h
+++ b/chrome/browser/android/tab_android.h
@@ -15,6 +15,7 @@
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/strings/string16.h"
+#include "chrome/browser/android/media_iph_manager.h"
#include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
#include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
#include "components/favicon/core/favicon_driver_observer.h"
@@ -51,7 +52,8 @@ class PrerenderManager;
class TabAndroid : public CoreTabHelperDelegate,
public content::NotificationObserver,
- public favicon::FaviconDriverObserver {
+ public favicon::FaviconDriverObserver,
+ public MediaIPHManagerClient {
public:
// A Java counterpart will be generated for this enum.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
@@ -135,6 +137,11 @@ class TabAndroid : public CoreTabHelperDelegate,
bool icon_url_changed,
const gfx::Image& image) override;
+ // MediaIPHManagerClient implementation.
+ bool ShowMediaDownloadIPH() override;
+ void UpdateMediaDownloadIPHPosition(const gfx::Rect& rect_in_frame) override;
+ void DismissMediaDownloadIPH() override;
+
// Returns true if this tab is currently presented in the context of custom
// tabs. Tabs can be moved between different activities so the returned value
// might change over the lifetime of the tab.
@@ -246,6 +253,10 @@ class TabAndroid : public CoreTabHelperDelegate,
const base::android::JavaParamRef<jobject>& obj,
jboolean enabled);
+ void DownloadMediaIPHDismissed(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
+
bool ShouldEnableEmbeddedMediaExperience() const;
scoped_refptr<content::DevToolsAgentHost> GetDevToolsAgentHost();
@@ -279,6 +290,7 @@ class TabAndroid : public CoreTabHelperDelegate,
web_contents_delegate_;
scoped_refptr<content::DevToolsAgentHost> devtools_host_;
std::unique_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_;
+ std::unique_ptr<MediaIPHManager> media_iph_manager_;
std::string webapp_manifest_scope_;
bool embedded_media_experience_enabled_;

Powered by Google App Engine
This is Rietveld 408576698