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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update webcontentsdelegateandroid Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 // timers so that we do not need to manage the shared timer in such a heavy 2025 // timers so that we do not need to manage the shared timer in such a heavy
2026 // handed manner. 2026 // handed manner.
2027 // 2027 //
2028 if (RenderThreadImpl::current()) // Will be NULL during unit tests. 2028 if (RenderThreadImpl::current()) // Will be NULL during unit tests.
2029 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); 2029 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer();
2030 2030
2031 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( 2031 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal(
2032 routing_id_, opener_id_)); 2032 routing_id_, opener_id_));
2033 } 2033 }
2034 2034
2035 bool RenderViewImpl::enterFullScreen() {
2036 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, true));
2037 return true;
2038 }
2039
2040 void RenderViewImpl::exitFullScreen() {
2041 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, false));
2042 }
2043
2044 bool RenderViewImpl::requestPointerLock() { 2035 bool RenderViewImpl::requestPointerLock() {
2045 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); 2036 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get());
2046 } 2037 }
2047 2038
2048 void RenderViewImpl::requestPointerUnlock() { 2039 void RenderViewImpl::requestPointerUnlock() {
2049 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2040 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2050 } 2041 }
2051 2042
2052 bool RenderViewImpl::isPointerLocked() { 2043 bool RenderViewImpl::isPointerLocked() {
2053 return mouse_lock_dispatcher_->IsMouseLockedTo( 2044 return mouse_lock_dispatcher_->IsMouseLockedTo(
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
4126 std::vector<gfx::Size> sizes; 4117 std::vector<gfx::Size> sizes;
4127 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4118 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4128 if (!url.isEmpty()) 4119 if (!url.isEmpty())
4129 urls.push_back( 4120 urls.push_back(
4130 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4121 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4131 } 4122 }
4132 SendUpdateFaviconURL(urls); 4123 SendUpdateFaviconURL(urls);
4133 } 4124 }
4134 4125
4135 } // namespace content 4126 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698