| 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 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 // timers so that we do not need to manage the shared timer in such a heavy | 2027 // timers so that we do not need to manage the shared timer in such a heavy |
| 2028 // handed manner. | 2028 // handed manner. |
| 2029 // | 2029 // |
| 2030 if (RenderThreadImpl::current()) // Will be NULL during unit tests. | 2030 if (RenderThreadImpl::current()) // Will be NULL during unit tests. |
| 2031 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); | 2031 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); |
| 2032 | 2032 |
| 2033 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( | 2033 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( |
| 2034 routing_id_, opener_id_)); | 2034 routing_id_, opener_id_)); |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 bool RenderViewImpl::enterFullScreen() { | |
| 2038 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, true)); | |
| 2039 return true; | |
| 2040 } | |
| 2041 | |
| 2042 void RenderViewImpl::exitFullScreen() { | |
| 2043 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, false)); | |
| 2044 } | |
| 2045 | |
| 2046 bool RenderViewImpl::requestPointerLock() { | 2037 bool RenderViewImpl::requestPointerLock() { |
| 2047 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); | 2038 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); |
| 2048 } | 2039 } |
| 2049 | 2040 |
| 2050 void RenderViewImpl::requestPointerUnlock() { | 2041 void RenderViewImpl::requestPointerUnlock() { |
| 2051 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2042 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2052 } | 2043 } |
| 2053 | 2044 |
| 2054 bool RenderViewImpl::isPointerLocked() { | 2045 bool RenderViewImpl::isPointerLocked() { |
| 2055 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2046 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| (...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4128 std::vector<gfx::Size> sizes; | 4119 std::vector<gfx::Size> sizes; |
| 4129 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4120 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4130 if (!url.isEmpty()) | 4121 if (!url.isEmpty()) |
| 4131 urls.push_back( | 4122 urls.push_back( |
| 4132 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4123 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4133 } | 4124 } |
| 4134 SendUpdateFaviconURL(urls); | 4125 SendUpdateFaviconURL(urls); |
| 4135 } | 4126 } |
| 4136 | 4127 |
| 4137 } // namespace content | 4128 } // namespace content |
| OLD | NEW |