Chromium Code Reviews| 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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1334 #if defined(OS_ANDROID) | 1334 #if defined(OS_ANDROID) |
| 1335 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, | 1335 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, |
| 1336 OnActivateNearestFindResult) | 1336 OnActivateNearestFindResult) |
| 1337 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) | 1337 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) |
| 1338 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) | 1338 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) |
| 1339 IPC_MESSAGE_HANDLER(ViewMsg_UndoScrollFocusedEditableNodeIntoView, | 1339 IPC_MESSAGE_HANDLER(ViewMsg_UndoScrollFocusedEditableNodeIntoView, |
| 1340 OnUndoScrollFocusedEditableNodeIntoRect) | 1340 OnUndoScrollFocusedEditableNodeIntoRect) |
| 1341 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1341 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
| 1342 OnUpdateTopControlsState) | 1342 OnUpdateTopControlsState) |
| 1343 IPC_MESSAGE_HANDLER(ViewMsg_PauseVideo, OnPauseVideo) | 1343 IPC_MESSAGE_HANDLER(ViewMsg_PauseVideo, OnPauseVideo) |
| 1344 IPC_MESSAGE_HANDLER(ViewMsg_ResumeVideo, OnResumeVideo) | |
| 1344 #elif defined(OS_MACOSX) | 1345 #elif defined(OS_MACOSX) |
| 1345 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) | 1346 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) |
| 1346 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 1347 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
| 1347 OnPluginImeCompositionCompleted) | 1348 OnPluginImeCompositionCompleted) |
| 1348 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) | 1349 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) |
| 1349 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) | 1350 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) |
| 1350 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) | 1351 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) |
| 1351 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) | 1352 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) |
| 1352 #endif | 1353 #endif |
| 1353 // Adding a new message? Add platform independent ones first, then put the | 1354 // Adding a new message? Add platform independent ones first, then put the |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1846 #endif | 1847 #endif |
| 1847 | 1848 |
| 1848 #if defined(OS_ANDROID) | 1849 #if defined(OS_ANDROID) |
| 1849 void RenderViewImpl::OnUndoScrollFocusedEditableNodeIntoRect() { | 1850 void RenderViewImpl::OnUndoScrollFocusedEditableNodeIntoRect() { |
| 1850 const WebNode node = GetFocusedNode(); | 1851 const WebNode node = GetFocusedNode(); |
| 1851 if (!node.isNull() && IsEditableNode(node)) | 1852 if (!node.isNull() && IsEditableNode(node)) |
| 1852 webview()->restoreScrollAndScaleState(); | 1853 webview()->restoreScrollAndScaleState(); |
| 1853 } | 1854 } |
| 1854 | 1855 |
| 1855 void RenderViewImpl::OnPauseVideo() { | 1856 void RenderViewImpl::OnPauseVideo() { |
| 1856 // Inform RendererMediaPlayerManager to release all video player resources. | 1857 media_player_manager_->PauseVideo(); |
| 1857 // If something is in progress the resource will not be freed, it will | 1858 } |
| 1858 // only be freed once the tab is destroyed or if the user navigates away | 1859 |
| 1859 // via WebMediaPlayerAndroid::Destroy. | 1860 void RenderViewImpl::OnResumeVideo() { |
|
qinmin
2013/12/06 00:10:13
s/OnResumeVideo/OnResumeFullscreenVideo/
| |
| 1860 media_player_manager_->ReleaseVideoResources(); | 1861 media_player_manager_->ResumeVideo(); |
| 1861 } | 1862 } |
| 1862 #endif | 1863 #endif |
| 1863 | 1864 |
| 1864 /////////////////////////////////////////////////////////////////////////////// | 1865 /////////////////////////////////////////////////////////////////////////////// |
| 1865 | 1866 |
| 1866 // Tell the embedding application that the URL of the active page has changed | 1867 // Tell the embedding application that the URL of the active page has changed |
| 1867 void RenderViewImpl::UpdateURL(WebFrame* frame) { | 1868 void RenderViewImpl::UpdateURL(WebFrame* frame) { |
| 1868 WebDataSource* ds = frame->dataSource(); | 1869 WebDataSource* ds = frame->dataSource(); |
| 1869 DCHECK(ds); | 1870 DCHECK(ds); |
| 1870 | 1871 |
| (...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6429 for (size_t i = 0; i < icon_urls.size(); i++) { | 6430 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6430 WebURL url = icon_urls[i].iconURL(); | 6431 WebURL url = icon_urls[i].iconURL(); |
| 6431 if (!url.isEmpty()) | 6432 if (!url.isEmpty()) |
| 6432 urls.push_back(FaviconURL(url, | 6433 urls.push_back(FaviconURL(url, |
| 6433 ToFaviconType(icon_urls[i].iconType()))); | 6434 ToFaviconType(icon_urls[i].iconType()))); |
| 6434 } | 6435 } |
| 6435 SendUpdateFaviconURL(urls); | 6436 SendUpdateFaviconURL(urls); |
| 6436 } | 6437 } |
| 6437 | 6438 |
| 6438 } // namespace content | 6439 } // namespace content |
| OLD | NEW |