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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 | 1350 |
1351 // Page messages. | 1351 // Page messages. |
1352 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, | 1352 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, |
1353 OnUpdateWindowScreenRect) | 1353 OnUpdateWindowScreenRect) |
1354 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) | 1354 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) |
1355 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); | 1355 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); |
1356 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) | 1356 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) |
1357 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) | 1357 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) |
1358 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, | 1358 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, |
1359 OnSetHistoryOffsetAndLength) | 1359 OnSetHistoryOffsetAndLength) |
| 1360 IPC_MESSAGE_HANDLER(PageMsg_AudioStateChanged, OnAudioStateChanged) |
1360 | 1361 |
1361 #if defined(OS_ANDROID) | 1362 #if defined(OS_ANDROID) |
1362 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1363 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
1363 OnUpdateTopControlsState) | 1364 OnUpdateTopControlsState) |
1364 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1365 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
1365 #elif defined(OS_MACOSX) | 1366 #elif defined(OS_MACOSX) |
1366 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1367 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
1367 OnGetRenderedText) | 1368 OnGetRenderedText) |
1368 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1369 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
1369 #endif | 1370 #endif |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 void RenderViewImpl::OnSetInitialFocus(bool reverse) { | 1442 void RenderViewImpl::OnSetInitialFocus(bool reverse) { |
1442 if (!webview()) | 1443 if (!webview()) |
1443 return; | 1444 return; |
1444 webview()->setInitialFocus(reverse); | 1445 webview()->setInitialFocus(reverse); |
1445 } | 1446 } |
1446 | 1447 |
1447 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { | 1448 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { |
1448 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); | 1449 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); |
1449 } | 1450 } |
1450 | 1451 |
| 1452 void RenderViewImpl::OnAudioStateChanged(bool is_audio_playing) { |
| 1453 webview()->audioStateChanged(is_audio_playing); |
| 1454 } |
| 1455 |
1451 /////////////////////////////////////////////////////////////////////////////// | 1456 /////////////////////////////////////////////////////////////////////////////// |
1452 | 1457 |
1453 void RenderViewImpl::SendUpdateState() { | 1458 void RenderViewImpl::SendUpdateState() { |
1454 // We don't use this path in OOPIF-enabled modes. | 1459 // We don't use this path in OOPIF-enabled modes. |
1455 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); | 1460 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); |
1456 | 1461 |
1457 HistoryEntry* entry = history_controller_->GetCurrentEntry(); | 1462 HistoryEntry* entry = history_controller_->GetCurrentEntry(); |
1458 if (!entry) | 1463 if (!entry) |
1459 return; | 1464 return; |
1460 | 1465 |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 if (IsUseZoomForDSFEnabled()) { | 3031 if (IsUseZoomForDSFEnabled()) { |
3027 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3032 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3028 } else { | 3033 } else { |
3029 webview()->setDeviceScaleFactor(device_scale_factor_); | 3034 webview()->setDeviceScaleFactor(device_scale_factor_); |
3030 } | 3035 } |
3031 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3036 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3032 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3037 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3033 } | 3038 } |
3034 | 3039 |
3035 } // namespace content | 3040 } // namespace content |
OLD | NEW |