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

Unified Diff: content/renderer/render_view.cc

Issue 7461059: Fullscreen JS API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments Created 9 years, 4 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
« chrome/browser/ui/browser.cc ('K') | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view.cc
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index 56271f3739d783debab5115a97a6db03bdf28ec3..d8638f54eeced92fd1d956b7102b90a32309a783 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -374,7 +374,7 @@ RenderView::RenderView(RenderThreadBase* render_thread,
render_thread_->AddRoute(routing_id_, this);
// Take a reference on behalf of the RenderThread. This will be balanced
- // when we receive ViewMsg_Close.
+ // when we receive ViewMsg_ClosePage.
AddRef();
// If this is a popup, we must wait for the CreatingNew_ACK message before
@@ -609,6 +609,7 @@ bool RenderView::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevel, OnSetZoomLevel)
IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL,
OnSetZoomLevelForLoadingURL)
+ IPC_MESSAGE_HANDLER(ViewMsg_ExitFullscreen, OnExitFullscreen)
IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault,
OnResetPageEncodingToDefault)
@@ -1676,6 +1677,14 @@ void RenderView::exitFullscreenForNode(const WebKit::WebNode& node) {
NOTIMPLEMENTED();
}
+void RenderView::enterFullscreen() {
+ Send(new ViewHostMsg_ToggleFullscreen(routing_id_, true));
+}
+
+void RenderView::exitFullscreen() {
+ Send(new ViewHostMsg_ToggleFullscreen(routing_id_, false));
+}
+
void RenderView::setStatusText(const WebString& text) {
}
@@ -3250,6 +3259,10 @@ void RenderView::OnSetZoomLevelForLoadingURL(const GURL& url,
host_zoom_levels_[url] = zoom_level;
}
+void RenderView::OnExitFullscreen() {
+ webview()->exitFullscreen();
+}
+
void RenderView::OnSetPageEncoding(const std::string& encoding_name) {
webview()->setPageEncoding(WebString::fromUTF8(encoding_name));
}
« chrome/browser/ui/browser.cc ('K') | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698