Index: content/shell/shell.cc |
diff --git a/content/shell/shell.cc b/content/shell/shell.cc |
index 8bed9bd2f65456f8a3f697d45c7c452c5e21bbf7..0fff828e2b8e703582c5dfc337b94d0acc51a167 100644 |
--- a/content/shell/shell.cc |
+++ b/content/shell/shell.cc |
@@ -41,7 +41,8 @@ base::Callback<void(Shell*)> Shell::shell_created_callback_; |
bool Shell::quit_message_loop_ = true; |
Shell::Shell(WebContents* web_contents) |
- : window_(NULL), |
+ : is_fullscreen_(false), |
+ window_(NULL), |
url_edit_view_(NULL) |
#if defined(OS_WIN) && !defined(USE_AURA) |
, default_edit_wnd_proc_(0) |
@@ -191,6 +192,27 @@ void Shell::LoadingStateChanged(WebContents* source) { |
PlatformSetIsLoading(source->IsLoading()); |
} |
+void Shell::ToggleFullscreenModeForTab(WebContents* web_contents, |
+ bool enter_fullscreen) { |
+#if defined(OS_ANDROID) |
+ PlatformToggleFullscreenModeForTab(web_contents, enter_fullscreen); |
+#endif |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
+ return; |
+ if (is_fullscreen_ != enter_fullscreen) { |
+ is_fullscreen_ = enter_fullscreen; |
+ web_contents->GetRenderViewHost()->WasResized(); |
+ } |
+} |
+ |
+bool Shell::IsFullscreenForTabOrPending(const WebContents* web_contents) const { |
+#if defined(OS_ANDROID) |
+ return PlatformIsFullscreenForTabOrPending(web_contents); |
+#else |
+ return is_fullscreen_; |
+#endif |
+} |
+ |
void Shell::CloseContents(WebContents* source) { |
Close(); |
} |