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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 OnDisableScrollbarsForSmallWindows) | 1345 OnDisableScrollbarsForSmallWindows) |
1346 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) | 1346 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) |
1347 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) | 1347 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) |
1348 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) | 1348 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) |
1349 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) | 1349 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) |
1350 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) | 1350 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) |
1351 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, | 1351 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, |
1352 OnReleaseDisambiguationPopupBitmap) | 1352 OnReleaseDisambiguationPopupBitmap) |
1353 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) | 1353 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) |
1354 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) | 1354 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) |
| 1355 IPC_MESSAGE_HANDLER(ViewMsg_AudioStateChanged, OnAudioStateChanged) |
1355 | 1356 |
1356 // Page messages. | 1357 // Page messages. |
1357 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, | 1358 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, |
1358 OnUpdateWindowScreenRect) | 1359 OnUpdateWindowScreenRect) |
1359 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) | 1360 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) |
1360 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); | 1361 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); |
1361 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) | 1362 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) |
1362 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) | 1363 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) |
1363 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, | 1364 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, |
1364 OnSetHistoryOffsetAndLength) | 1365 OnSetHistoryOffsetAndLength) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 void RenderViewImpl::OnSetInitialFocus(bool reverse) { | 1447 void RenderViewImpl::OnSetInitialFocus(bool reverse) { |
1447 if (!webview()) | 1448 if (!webview()) |
1448 return; | 1449 return; |
1449 webview()->setInitialFocus(reverse); | 1450 webview()->setInitialFocus(reverse); |
1450 } | 1451 } |
1451 | 1452 |
1452 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { | 1453 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { |
1453 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); | 1454 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); |
1454 } | 1455 } |
1455 | 1456 |
| 1457 void RenderViewImpl::OnAudioStateChanged(bool is_audio_playing) { |
| 1458 webview()->audioStateChanged(is_audio_playing); |
| 1459 } |
| 1460 |
1456 /////////////////////////////////////////////////////////////////////////////// | 1461 /////////////////////////////////////////////////////////////////////////////// |
1457 | 1462 |
1458 void RenderViewImpl::SendUpdateState() { | 1463 void RenderViewImpl::SendUpdateState() { |
1459 // We don't use this path in OOPIF-enabled modes. | 1464 // We don't use this path in OOPIF-enabled modes. |
1460 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); | 1465 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); |
1461 | 1466 |
1462 HistoryEntry* entry = history_controller_->GetCurrentEntry(); | 1467 HistoryEntry* entry = history_controller_->GetCurrentEntry(); |
1463 if (!entry) | 1468 if (!entry) |
1464 return; | 1469 return; |
1465 | 1470 |
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3018 if (IsUseZoomForDSFEnabled()) { | 3023 if (IsUseZoomForDSFEnabled()) { |
3019 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3024 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3020 } else { | 3025 } else { |
3021 webview()->setDeviceScaleFactor(device_scale_factor_); | 3026 webview()->setDeviceScaleFactor(device_scale_factor_); |
3022 } | 3027 } |
3023 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3028 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3024 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3029 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3025 } | 3030 } |
3026 | 3031 |
3027 } // namespace content | 3032 } // namespace content |
OLD | NEW |