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

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: 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 cb190d9230b27414932897b33d77a9821599d5b6..c3d897c4c810db9e68e612bca5de36be58890404 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -91,6 +91,7 @@ class WebViewGuest : public GuestView<WebViewGuest>,
std::string* error);
// GuestViewBase implementation.
+ void EmbedderFullscreenToggled(bool entered_fullscreen) override;
bool CanRunInDetachedState() const override;
void CreateWebContents(const base::DictionaryValue& create_params,
const WebContentsCreatedCallback& callback) 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,
@@ -320,6 +326,10 @@ class WebViewGuest : public GuestView<WebViewGuest>,
void ApplyAttributes(const base::DictionaryValue& params);
+ void OnFullscreenPermissionDecided(const GURL& origin,
+ bool allowed,
+ const std::string& user_input);
+
// Identifies the set of rules registries belonging to this guest.
int rules_registry_id_;
@@ -371,6 +381,7 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// Determines if this guest accepts pinch-zoom gestures.
bool allow_scaling_;
+ bool is_fullscreen_;
// This is used to ensure pending tasks will not fire after this object is
// destroyed.

Powered by Google App Engine
This is Rietveld 408576698