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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "content/child/webmessageportchannel_impl.h" | 42 #include "content/child/webmessageportchannel_impl.h" |
43 #include "content/common/content_constants_internal.h" | 43 #include "content/common/content_constants_internal.h" |
44 #include "content/common/content_switches_internal.h" | 44 #include "content/common/content_switches_internal.h" |
45 #include "content/common/database_messages.h" | 45 #include "content/common/database_messages.h" |
46 #include "content/common/dom_storage/dom_storage_types.h" | 46 #include "content/common/dom_storage/dom_storage_types.h" |
47 #include "content/common/drag_messages.h" | 47 #include "content/common/drag_messages.h" |
48 #include "content/common/frame_messages.h" | 48 #include "content/common/frame_messages.h" |
49 #include "content/common/frame_replication_state.h" | 49 #include "content/common/frame_replication_state.h" |
50 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 50 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
51 #include "content/common/input_messages.h" | 51 #include "content/common/input_messages.h" |
| 52 #include "content/common/page_messages.h" |
52 #include "content/common/pepper_messages.h" | 53 #include "content/common/pepper_messages.h" |
53 #include "content/common/site_isolation_policy.h" | 54 #include "content/common/site_isolation_policy.h" |
54 #include "content/common/ssl_status_serialization.h" | 55 #include "content/common/ssl_status_serialization.h" |
55 #include "content/common/view_messages.h" | 56 #include "content/common/view_messages.h" |
56 #include "content/public/common/bindings_policy.h" | 57 #include "content/public/common/bindings_policy.h" |
57 #include "content/public/common/content_client.h" | 58 #include "content/public/common/content_client.h" |
58 #include "content/public/common/content_constants.h" | 59 #include "content/public/common/content_constants.h" |
59 #include "content/public/common/content_switches.h" | 60 #include "content/public/common/content_switches.h" |
60 #include "content/public/common/drop_data.h" | 61 #include "content/public/common/drop_data.h" |
61 #include "content/public/common/favicon_url.h" | 62 #include "content/public/common/favicon_url.h" |
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) | 1399 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) |
1399 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) | 1400 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) |
1400 // TODO(viettrungluu): Move to a separate message filter. | 1401 // TODO(viettrungluu): Move to a separate message filter. |
1401 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryOffsetAndLength, | 1402 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryOffsetAndLength, |
1402 OnSetHistoryOffsetAndLength) | 1403 OnSetHistoryOffsetAndLength) |
1403 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1404 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
1404 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, | 1405 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, |
1405 OnReleaseDisambiguationPopupBitmap) | 1406 OnReleaseDisambiguationPopupBitmap) |
1406 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) | 1407 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) |
1407 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) | 1408 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) |
| 1409 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, |
| 1410 OnUpdateWindowScreenRect) |
1408 #if defined(OS_ANDROID) | 1411 #if defined(OS_ANDROID) |
1409 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1412 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
1410 OnUpdateTopControlsState) | 1413 OnUpdateTopControlsState) |
1411 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1414 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
1412 #elif defined(OS_MACOSX) | 1415 #elif defined(OS_MACOSX) |
1413 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1416 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
1414 OnGetRenderedText) | 1417 OnGetRenderedText) |
1415 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 1418 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
1416 OnPluginImeCompositionCompleted) | 1419 OnPluginImeCompositionCompleted) |
1417 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1420 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 history_list_offset_ = history_offset; | 1508 history_list_offset_ = history_offset; |
1506 history_list_length_ = history_length; | 1509 history_list_length_ = history_length; |
1507 } | 1510 } |
1508 | 1511 |
1509 void RenderViewImpl::OnSetInitialFocus(bool reverse) { | 1512 void RenderViewImpl::OnSetInitialFocus(bool reverse) { |
1510 if (!webview()) | 1513 if (!webview()) |
1511 return; | 1514 return; |
1512 webview()->setInitialFocus(reverse); | 1515 webview()->setInitialFocus(reverse); |
1513 } | 1516 } |
1514 | 1517 |
| 1518 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { |
| 1519 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); |
| 1520 } |
| 1521 |
1515 #if defined(OS_MACOSX) | 1522 #if defined(OS_MACOSX) |
1516 void RenderViewImpl::OnSetInLiveResize(bool in_live_resize) { | 1523 void RenderViewImpl::OnSetInLiveResize(bool in_live_resize) { |
1517 if (!webview()) | 1524 if (!webview()) |
1518 return; | 1525 return; |
1519 if (in_live_resize) | 1526 if (in_live_resize) |
1520 webview()->willStartLiveResize(); | 1527 webview()->willStartLiveResize(); |
1521 else | 1528 else |
1522 webview()->willEndLiveResize(); | 1529 webview()->willEndLiveResize(); |
1523 } | 1530 } |
1524 #endif | 1531 #endif |
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3535 if (IsUseZoomForDSFEnabled()) { | 3542 if (IsUseZoomForDSFEnabled()) { |
3536 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3543 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3537 } else { | 3544 } else { |
3538 webview()->setDeviceScaleFactor(device_scale_factor_); | 3545 webview()->setDeviceScaleFactor(device_scale_factor_); |
3539 } | 3546 } |
3540 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3547 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3541 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3548 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3542 } | 3549 } |
3543 | 3550 |
3544 } // namespace content | 3551 } // namespace content |
OLD | NEW |