const GURL& origin) {
auto window = GetWindowFromGuest(source);
if (window) {
- window->SetFullScreen(true);
+ window->SetHtmlApiFullscreen(true);
source->GetRenderViewHost()->WasResized();
}
}
void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
auto window = GetWindowFromGuest(source);
if (window) {
- window->SetFullScreen(false);
+ window->SetHtmlApiFullscreen(false);
source->GetRenderViewHost()->WasResized();
}
}
const content::WebContents* source) const {
auto window = GetWindowFromGuest(source);
if (window)
- return window->IsFullscreen();
+ return window->IsHtmlApiFullscreen();
else
return false;
}
is_closed_(false),
node_integration_(true),
has_dialog_attached_(false),
+ fullscreen_(false),
zoom_factor_(1.0),
weak_factory_(this),
inspectable_web_contents_(
void NativeWindow::EnterFullscreenModeForTab(content::WebContents* source,
const GURL& origin) {
- SetFullScreen(true);
+ SetHtmlApiFullscreen(true);
}
void NativeWindow::ExitFullscreenModeForTab(content::WebContents* source) {
- SetFullScreen(false);
+ SetHtmlApiFullscreen(false);
}
bool NativeWindow::IsFullscreenForTabOrPending(
const content::WebContents* source) const {
- return IsFullscreen();
+ return IsHtmlApiFullscreen();
}
void NativeWindow::BeforeUnloadFired(const base::TimeTicks& proceed_time) {
base::TimeDelta::FromMilliseconds(ms));
}
+void NativeWindow::SetHtmlApiFullscreen(bool enter_fullscreen) {
+ SetFullScreen(enter_fullscreen);
+ fullscreen_ = enter_fullscreen;
+}
+
void NativeWindow::NotifyWindowUnresponsive() {
window_unresposive_closure_.Cancel();
int child_process_id);
void OverrideWebkitPrefs(content::WebPreferences* prefs);
+ // Set fullscreen mode triggered by html api.
+ void SetHtmlApiFullscreen(bool enter_fullscreen);
+
// Public API used by platform-dependent delegates and observers to send UI
// related notifications.
void NotifyWindowClosed();
bool has_frame() const { return has_frame_; }
+ bool IsHtmlApiFullscreen() const { return fullscreen_; }
+
void set_has_dialog_attached(bool has_dialog_attached) {
has_dialog_attached_ = has_dialog_attached;
}
// There is a dialog that has been attached to window.
bool has_dialog_attached_;
+ // Whether window is fullscreened by HTML5 api.
+ bool fullscreen_;
+
// Closure that would be called when window is unresponsive when closing,
// it should be cancelled when we can prove that the window is responsive.
base::CancelableClosure window_unresposive_closure_;