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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 void RenderViewImpl::SetZoomLevel(double zoom_level) { | 1584 void RenderViewImpl::SetZoomLevel(double zoom_level) { |
1585 // If we change the zoom level for the view, make sure any subsequent subframe | 1585 // If we change the zoom level for the view, make sure any subsequent subframe |
1586 // loads reflect the current zoom level. | 1586 // loads reflect the current zoom level. |
1587 page_zoom_level_ = zoom_level; | 1587 page_zoom_level_ = zoom_level; |
1588 | 1588 |
1589 webview()->setZoomLevel(zoom_level); | 1589 webview()->setZoomLevel(zoom_level); |
1590 for (auto& observer : observers_) | 1590 for (auto& observer : observers_) |
1591 observer.OnZoomLevelChanged(); | 1591 observer.OnZoomLevelChanged(); |
1592 } | 1592 } |
1593 | 1593 |
1594 void RenderViewImpl::didCancelCompositionOnSelectionChange() { | |
1595 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID())); | |
1596 } | |
1597 | |
1598 void RenderViewImpl::SetValidationMessageDirection( | 1594 void RenderViewImpl::SetValidationMessageDirection( |
1599 base::string16* wrapped_main_text, | 1595 base::string16* wrapped_main_text, |
1600 blink::WebTextDirection main_text_hint, | 1596 blink::WebTextDirection main_text_hint, |
1601 base::string16* wrapped_sub_text, | 1597 base::string16* wrapped_sub_text, |
1602 blink::WebTextDirection sub_text_hint) { | 1598 blink::WebTextDirection sub_text_hint) { |
1603 if (main_text_hint == blink::WebTextDirectionLeftToRight) { | 1599 if (main_text_hint == blink::WebTextDirectionLeftToRight) { |
1604 *wrapped_main_text = | 1600 *wrapped_main_text = |
1605 base::i18n::GetDisplayStringInLTRDirectionality(*wrapped_main_text); | 1601 base::i18n::GetDisplayStringInLTRDirectionality(*wrapped_main_text); |
1606 } else if (main_text_hint == blink::WebTextDirectionRightToLeft && | 1602 } else if (main_text_hint == blink::WebTextDirectionRightToLeft && |
1607 !base::i18n::IsRTL()) { | 1603 !base::i18n::IsRTL()) { |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2733 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2729 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2734 } | 2730 } |
2735 | 2731 |
2736 std::unique_ptr<InputEventAck> ack( | 2732 std::unique_ptr<InputEventAck> ack( |
2737 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2733 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
2738 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2734 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2739 OnInputEventAck(std::move(ack)); | 2735 OnInputEventAck(std::move(ack)); |
2740 } | 2736 } |
2741 | 2737 |
2742 } // namespace content | 2738 } // namespace content |
OLD | NEW |