| 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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 // timers so that we do not need to manage the shared timer in such a heavy | 2021 // timers so that we do not need to manage the shared timer in such a heavy |
| 2022 // handed manner. | 2022 // handed manner. |
| 2023 // | 2023 // |
| 2024 if (RenderThreadImpl::current()) // Will be NULL during unit tests. | 2024 if (RenderThreadImpl::current()) // Will be NULL during unit tests. |
| 2025 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); | 2025 RenderThreadImpl::current()->DoNotSuspendWebKitSharedTimer(); |
| 2026 | 2026 |
| 2027 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( | 2027 SendAndRunNestedMessageLoop(new ViewHostMsg_RunModal( |
| 2028 routing_id_, opener_id_)); | 2028 routing_id_, opener_id_)); |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 bool RenderViewImpl::enterFullScreen() { | |
| 2032 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, true)); | |
| 2033 return true; | |
| 2034 } | |
| 2035 | |
| 2036 void RenderViewImpl::exitFullScreen() { | |
| 2037 Send(new ViewHostMsg_ToggleFullscreen(routing_id_, false)); | |
| 2038 } | |
| 2039 | |
| 2040 bool RenderViewImpl::requestPointerLock() { | 2031 bool RenderViewImpl::requestPointerLock() { |
| 2041 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); | 2032 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); |
| 2042 } | 2033 } |
| 2043 | 2034 |
| 2044 void RenderViewImpl::requestPointerUnlock() { | 2035 void RenderViewImpl::requestPointerUnlock() { |
| 2045 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2036 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2046 } | 2037 } |
| 2047 | 2038 |
| 2048 bool RenderViewImpl::isPointerLocked() { | 2039 bool RenderViewImpl::isPointerLocked() { |
| 2049 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2040 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| (...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4105 std::vector<gfx::Size> sizes; | 4096 std::vector<gfx::Size> sizes; |
| 4106 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4097 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4107 if (!url.isEmpty()) | 4098 if (!url.isEmpty()) |
| 4108 urls.push_back( | 4099 urls.push_back( |
| 4109 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4100 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4110 } | 4101 } |
| 4111 SendUpdateFaviconURL(urls); | 4102 SendUpdateFaviconURL(urls); |
| 4112 } | 4103 } |
| 4113 | 4104 |
| 4114 } // namespace content | 4105 } // namespace content |
| OLD | NEW |