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

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: Disable one test one test on mac with bug ref, use document.webkitIsFullScreen 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..aef60ad98fec4e19070799edb58f3606f3e9c9b8 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(bool allowed,
+ const std::string& user_input);
+ bool GuestMadeEmbedderFullscreen() const;
+ 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.
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_constants.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698