| 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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 | 1356 |
| 1357 // Page messages. | 1357 // Page messages. |
| 1358 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, | 1358 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, |
| 1359 OnUpdateWindowScreenRect) | 1359 OnUpdateWindowScreenRect) |
| 1360 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) | 1360 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) |
| 1361 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); | 1361 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); |
| 1362 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) | 1362 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) |
| 1363 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) | 1363 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) |
| 1364 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, | 1364 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, |
| 1365 OnSetHistoryOffsetAndLength) | 1365 OnSetHistoryOffsetAndLength) |
| 1366 IPC_MESSAGE_HANDLER(PageMsg_AudioStateChanged, OnAudioStateChanged) | |
| 1367 | 1366 |
| 1368 #if defined(OS_ANDROID) | 1367 #if defined(OS_ANDROID) |
| 1369 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1368 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
| 1370 OnUpdateTopControlsState) | 1369 OnUpdateTopControlsState) |
| 1371 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1370 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
| 1372 #elif defined(OS_MACOSX) | 1371 #elif defined(OS_MACOSX) |
| 1373 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1372 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
| 1374 OnGetRenderedText) | 1373 OnGetRenderedText) |
| 1375 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1374 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
| 1376 #endif | 1375 #endif |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 void RenderViewImpl::OnSetInitialFocus(bool reverse) { | 1447 void RenderViewImpl::OnSetInitialFocus(bool reverse) { |
| 1449 if (!webview()) | 1448 if (!webview()) |
| 1450 return; | 1449 return; |
| 1451 webview()->setInitialFocus(reverse); | 1450 webview()->setInitialFocus(reverse); |
| 1452 } | 1451 } |
| 1453 | 1452 |
| 1454 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { | 1453 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { |
| 1455 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); | 1454 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); |
| 1456 } | 1455 } |
| 1457 | 1456 |
| 1458 void RenderViewImpl::OnAudioStateChanged(bool is_audio_playing) { | |
| 1459 webview()->audioStateChanged(is_audio_playing); | |
| 1460 } | |
| 1461 | |
| 1462 /////////////////////////////////////////////////////////////////////////////// | 1457 /////////////////////////////////////////////////////////////////////////////// |
| 1463 | 1458 |
| 1464 void RenderViewImpl::SendUpdateState() { | 1459 void RenderViewImpl::SendUpdateState() { |
| 1465 // We don't use this path in OOPIF-enabled modes. | 1460 // We don't use this path in OOPIF-enabled modes. |
| 1466 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); | 1461 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| 1467 | 1462 |
| 1468 HistoryEntry* entry = history_controller_->GetCurrentEntry(); | 1463 HistoryEntry* entry = history_controller_->GetCurrentEntry(); |
| 1469 if (!entry) | 1464 if (!entry) |
| 1470 return; | 1465 return; |
| 1471 | 1466 |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3024 if (IsUseZoomForDSFEnabled()) { | 3019 if (IsUseZoomForDSFEnabled()) { |
| 3025 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3020 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3026 } else { | 3021 } else { |
| 3027 webview()->setDeviceScaleFactor(device_scale_factor_); | 3022 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3028 } | 3023 } |
| 3029 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3024 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3030 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3025 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3031 } | 3026 } |
| 3032 | 3027 |
| 3033 } // namespace content | 3028 } // namespace content |
| OLD | NEW |