| 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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 #if defined(OS_ANDROID) | 1411 #if defined(OS_ANDROID) |
| 1412 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1412 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
| 1413 OnUpdateTopControlsState) | 1413 OnUpdateTopControlsState) |
| 1414 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1414 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
| 1415 #elif defined(OS_MACOSX) | 1415 #elif defined(OS_MACOSX) |
| 1416 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1416 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
| 1417 OnGetRenderedText) | 1417 OnGetRenderedText) |
| 1418 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 1418 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
| 1419 OnPluginImeCompositionCompleted) | 1419 OnPluginImeCompositionCompleted) |
| 1420 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1420 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
| 1421 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) | |
| 1422 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) | 1421 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) |
| 1423 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) | 1422 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) |
| 1424 #endif | 1423 #endif |
| 1425 // Adding a new message? Add platform independent ones first, then put the | 1424 // Adding a new message? Add platform independent ones first, then put the |
| 1426 // platform specific ones at the end. | 1425 // platform specific ones at the end. |
| 1427 | 1426 |
| 1428 // Have the super handle all other messages. | 1427 // Have the super handle all other messages. |
| 1429 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) | 1428 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) |
| 1430 IPC_END_MESSAGE_MAP() | 1429 IPC_END_MESSAGE_MAP() |
| 1431 | 1430 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 void RenderViewImpl::OnSetInitialFocus(bool reverse) { | 1511 void RenderViewImpl::OnSetInitialFocus(bool reverse) { |
| 1513 if (!webview()) | 1512 if (!webview()) |
| 1514 return; | 1513 return; |
| 1515 webview()->setInitialFocus(reverse); | 1514 webview()->setInitialFocus(reverse); |
| 1516 } | 1515 } |
| 1517 | 1516 |
| 1518 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { | 1517 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { |
| 1519 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); | 1518 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); |
| 1520 } | 1519 } |
| 1521 | 1520 |
| 1522 #if defined(OS_MACOSX) | |
| 1523 void RenderViewImpl::OnSetInLiveResize(bool in_live_resize) { | |
| 1524 if (!webview()) | |
| 1525 return; | |
| 1526 if (in_live_resize) | |
| 1527 webview()->willStartLiveResize(); | |
| 1528 else | |
| 1529 webview()->willEndLiveResize(); | |
| 1530 } | |
| 1531 #endif | |
| 1532 | |
| 1533 /////////////////////////////////////////////////////////////////////////////// | 1521 /////////////////////////////////////////////////////////////////////////////// |
| 1534 | 1522 |
| 1535 void RenderViewImpl::SendUpdateState() { | 1523 void RenderViewImpl::SendUpdateState() { |
| 1536 // We don't use this path in OOPIF-enabled modes. | 1524 // We don't use this path in OOPIF-enabled modes. |
| 1537 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); | 1525 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| 1538 | 1526 |
| 1539 HistoryEntry* entry = history_controller_->GetCurrentEntry(); | 1527 HistoryEntry* entry = history_controller_->GetCurrentEntry(); |
| 1540 if (!entry) | 1528 if (!entry) |
| 1541 return; | 1529 return; |
| 1542 | 1530 |
| (...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3553 if (IsUseZoomForDSFEnabled()) { | 3541 if (IsUseZoomForDSFEnabled()) { |
| 3554 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3542 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3555 } else { | 3543 } else { |
| 3556 webview()->setDeviceScaleFactor(device_scale_factor_); | 3544 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3557 } | 3545 } |
| 3558 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3546 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3559 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3547 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3560 } | 3548 } |
| 3561 | 3549 |
| 3562 } // namespace content | 3550 } // namespace content |
| OLD | NEW |