| 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 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 #if defined(OS_ANDROID) | 1404 #if defined(OS_ANDROID) |
| 1405 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1405 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
| 1406 OnUpdateTopControlsState) | 1406 OnUpdateTopControlsState) |
| 1407 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1407 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
| 1408 #elif defined(OS_MACOSX) | 1408 #elif defined(OS_MACOSX) |
| 1409 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1409 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
| 1410 OnGetRenderedText) | 1410 OnGetRenderedText) |
| 1411 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 1411 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
| 1412 OnPluginImeCompositionCompleted) | 1412 OnPluginImeCompositionCompleted) |
| 1413 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1413 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
| 1414 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) | |
| 1415 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) | 1414 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) |
| 1416 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) | 1415 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) |
| 1417 #endif | 1416 #endif |
| 1418 // Adding a new message? Add platform independent ones first, then put the | 1417 // Adding a new message? Add platform independent ones first, then put the |
| 1419 // platform specific ones at the end. | 1418 // platform specific ones at the end. |
| 1420 | 1419 |
| 1421 // Have the super handle all other messages. | 1420 // Have the super handle all other messages. |
| 1422 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) | 1421 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) |
| 1423 IPC_END_MESSAGE_MAP() | 1422 IPC_END_MESSAGE_MAP() |
| 1424 | 1423 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 history_list_offset_ = history_offset; | 1500 history_list_offset_ = history_offset; |
| 1502 history_list_length_ = history_length; | 1501 history_list_length_ = history_length; |
| 1503 } | 1502 } |
| 1504 | 1503 |
| 1505 void RenderViewImpl::OnSetInitialFocus(bool reverse) { | 1504 void RenderViewImpl::OnSetInitialFocus(bool reverse) { |
| 1506 if (!webview()) | 1505 if (!webview()) |
| 1507 return; | 1506 return; |
| 1508 webview()->setInitialFocus(reverse); | 1507 webview()->setInitialFocus(reverse); |
| 1509 } | 1508 } |
| 1510 | 1509 |
| 1511 #if defined(OS_MACOSX) | |
| 1512 void RenderViewImpl::OnSetInLiveResize(bool in_live_resize) { | |
| 1513 if (!webview()) | |
| 1514 return; | |
| 1515 if (in_live_resize) | |
| 1516 webview()->willStartLiveResize(); | |
| 1517 else | |
| 1518 webview()->willEndLiveResize(); | |
| 1519 } | |
| 1520 #endif | |
| 1521 | |
| 1522 /////////////////////////////////////////////////////////////////////////////// | 1510 /////////////////////////////////////////////////////////////////////////////// |
| 1523 | 1511 |
| 1524 void RenderViewImpl::SendUpdateState() { | 1512 void RenderViewImpl::SendUpdateState() { |
| 1525 // We don't use this path in OOPIF-enabled modes. | 1513 // We don't use this path in OOPIF-enabled modes. |
| 1526 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); | 1514 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| 1527 | 1515 |
| 1528 HistoryEntry* entry = history_controller_->GetCurrentEntry(); | 1516 HistoryEntry* entry = history_controller_->GetCurrentEntry(); |
| 1529 if (!entry) | 1517 if (!entry) |
| 1530 return; | 1518 return; |
| 1531 | 1519 |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3549 if (IsUseZoomForDSFEnabled()) { | 3537 if (IsUseZoomForDSFEnabled()) { |
| 3550 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3538 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3551 } else { | 3539 } else { |
| 3552 webview()->setDeviceScaleFactor(device_scale_factor_); | 3540 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3553 } | 3541 } |
| 3554 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3542 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3555 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3543 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3556 } | 3544 } |
| 3557 | 3545 |
| 3558 } // namespace content | 3546 } // namespace content |
| OLD | NEW |