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