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

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: rebase 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
« no previous file with comments | « 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 f2d7412bf483c64f907621cbb912a0b30c24d703..f1eef24a35aaa8aa1a99df3c98035058c8c4e80d 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -388,7 +388,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
@@ -631,6 +631,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)
@@ -1739,6 +1740,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) {
}
@@ -3425,6 +3434,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));
}
« no previous file with comments | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698