OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); | 50 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); |
51 DCHECK(webFrame); | 51 DCHECK(webFrame); |
52 DCHECK(webFrame->client()); | 52 DCHECK(webFrame->client()); |
53 return *webFrame->client(); | 53 return *webFrame->client(); |
54 } | 54 } |
55 | 55 |
56 } // anonymous namespace | 56 } // anonymous namespace |
57 | 57 |
58 std::unique_ptr<FullscreenController> FullscreenController::create( | 58 std::unique_ptr<FullscreenController> FullscreenController::create( |
59 WebViewImpl* webViewImpl) { | 59 WebViewImpl* webViewImpl) { |
60 return wrapUnique(new FullscreenController(webViewImpl)); | 60 return WTF::wrapUnique(new FullscreenController(webViewImpl)); |
61 } | 61 } |
62 | 62 |
63 FullscreenController::FullscreenController(WebViewImpl* webViewImpl) | 63 FullscreenController::FullscreenController(WebViewImpl* webViewImpl) |
64 : m_webViewImpl(webViewImpl) {} | 64 : m_webViewImpl(webViewImpl) {} |
65 | 65 |
66 void FullscreenController::didEnterFullscreen() { | 66 void FullscreenController::didEnterFullscreen() { |
67 // |Browser::EnterFullscreenModeForTab()| can enter fullscreen without going | 67 // |Browser::EnterFullscreenModeForTab()| can enter fullscreen without going |
68 // through |Fullscreen::requestFullscreen()|, in which case there will be no | 68 // through |Fullscreen::requestFullscreen()|, in which case there will be no |
69 // fullscreen element. Do nothing. | 69 // fullscreen element. Do nothing. |
70 if (m_state != State::EnteringFullscreen) | 70 if (m_state != State::EnteringFullscreen) |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // again to ensure the final constraints pick up the latest contents size. | 267 // again to ensure the final constraints pick up the latest contents size. |
268 m_webViewImpl->didChangeContentsSize(); | 268 m_webViewImpl->didChangeContentsSize(); |
269 if (m_webViewImpl->mainFrameImpl() && | 269 if (m_webViewImpl->mainFrameImpl() && |
270 m_webViewImpl->mainFrameImpl()->frameView()) | 270 m_webViewImpl->mainFrameImpl()->frameView()) |
271 m_webViewImpl->mainFrameImpl()->frameView()->setNeedsLayout(); | 271 m_webViewImpl->mainFrameImpl()->frameView()->setNeedsLayout(); |
272 | 272 |
273 m_webViewImpl->updateMainFrameLayoutSize(); | 273 m_webViewImpl->updateMainFrameLayoutSize(); |
274 } | 274 } |
275 | 275 |
276 } // namespace blink | 276 } // namespace blink |
OLD | NEW |