OLD | NEW |
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 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2079 // timers so that we do not need to manage the shared timer in such a heavy | 2079 // timers so that we do not need to manage the shared timer in such a heavy |
2080 // handed manner. | 2080 // handed manner. |
2081 // | 2081 // |
2082 if (RenderThreadImpl::current()) // Will be NULL during unit tests. | 2082 if (RenderThreadImpl::current()) // Will be NULL during unit tests. |
2083 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); | 2083 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); |
2084 | 2084 |
2085 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( | 2085 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( |
2086 routing_id_, opener_id_)); | 2086 routing_id_, opener_id_)); |
2087 } | 2087 } |
2088 | 2088 |
2089 bool RenderViewImpl::enterFullScreen() { | |
2090 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, true)); | |
2091 return true; | |
2092 } | |
2093 | |
2094 void RenderViewImpl::exitFullScreen() { | |
2095 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, false)); | |
2096 } | |
2097 | |
2098 bool RenderViewImpl::requestPointerLock() { | 2089 bool RenderViewImpl::requestPointerLock() { |
2099 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); | 2090 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); |
2100 } | 2091 } |
2101 | 2092 |
2102 void RenderViewImpl::requestPointerUnlock() { | 2093 void RenderViewImpl::requestPointerUnlock() { |
2103 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2094 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
2104 } | 2095 } |
2105 | 2096 |
2106 bool RenderViewImpl::isPointerLocked() { | 2097 bool RenderViewImpl::isPointerLocked() { |
2107 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2098 return mouse_lock_dispatcher_->IsMouseLockedTo( |
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4210 std::vector<gfx::Size> sizes; | 4201 std::vector<gfx::Size> sizes; |
4211 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4202 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4212 if (!url.isEmpty()) | 4203 if (!url.isEmpty()) |
4213 urls.push_back( | 4204 urls.push_back( |
4214 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4205 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4215 } | 4206 } |
4216 SendUpdateFaviconURL(urls); | 4207 SendUpdateFaviconURL(urls); |
4217 } | 4208 } |
4218 | 4209 |
4219 } // namespace content | 4210 } // namespace content |
OLD | NEW |