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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.h

Issue 984963004: <webview>: Implement fullscreen permission for html5 element.requestFullscreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tmptmptmp
Patch Set: Clean up for review. Created 5 years, 9 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: extensions/browser/guest_view/web_view/web_view_guest.h
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h
index 2612c419eea275bf6403e154f0eef18da2bd121a..527cf1d5bd5537402fc8e0dbdb188332046e7e25 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -98,6 +98,7 @@ class WebViewGuest : public GuestView<WebViewGuest>,
void DidDropLink(const GURL& url) override;
void DidInitialize(const base::DictionaryValue& create_params) override;
void DidStopLoading() override;
+ void EmbedderFullscreenToggled(bool entered_fullscreen) override;
void EmbedderWillBeDestroyed() override;
const char* GetAPINamespace() const override;
int GetTaskPrefix() const override;
@@ -164,6 +165,11 @@ class WebViewGuest : public GuestView<WebViewGuest>,
const base::string16& frame_name,
const GURL& target_url,
content::WebContents* new_contents) override;
+ void EnterFullscreenModeForTab(content::WebContents* web_contents,
+ const GURL& origin) override;
+ void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
+ bool IsFullscreenForTabOrPending(
+ const content::WebContents* web_contents) const override;
// NotificationObserver implementation.
void Observe(int type,
@@ -250,6 +256,11 @@ class WebViewGuest : public GuestView<WebViewGuest>,
bool allow,
const std::string& user_input);
+ void OnFullscreenPermissionDecided(const GURL& origin,
+ bool allowed,
+ const std::string& user_input);
+ void SetFullscreenState(bool is_fullscreen);
+
// WebContentsObserver implementation.
void DidCommitProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
@@ -369,6 +380,9 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// Determines if this guest accepts pinch-zoom gestures.
bool allow_scaling_;
+ bool is_guest_fullscreen_;
+ bool is_embedder_fullscreen_;
+ bool last_fullscreen_permission_was_allowed_by_embedder_;
// This is used to ensure pending tasks will not fire after this object is
// destroyed.

Powered by Google App Engine
This is Rietveld 408576698