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 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 | 1355 |
1356 // Page messages. | 1356 // Page messages. |
1357 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, | 1357 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, |
1358 OnUpdateWindowScreenRect) | 1358 OnUpdateWindowScreenRect) |
1359 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) | 1359 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) |
1360 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); | 1360 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); |
1361 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) | 1361 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) |
1362 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) | 1362 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) |
1363 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, | 1363 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, |
1364 OnSetHistoryOffsetAndLength) | 1364 OnSetHistoryOffsetAndLength) |
| 1365 IPC_MESSAGE_HANDLER(PageMsg_AudioStateChanged, OnAudioStateChanged) |
1365 | 1366 |
1366 #if defined(OS_ANDROID) | 1367 #if defined(OS_ANDROID) |
1367 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1368 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
1368 OnUpdateTopControlsState) | 1369 OnUpdateTopControlsState) |
1369 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1370 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
1370 #elif defined(OS_MACOSX) | 1371 #elif defined(OS_MACOSX) |
1371 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1372 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
1372 OnGetRenderedText) | 1373 OnGetRenderedText) |
1373 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1374 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
1374 #endif | 1375 #endif |
(...skipping 71 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 |