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 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1558 void RenderViewImpl::SetZoomLevel(double zoom_level) { | 1558 void RenderViewImpl::SetZoomLevel(double zoom_level) { |
1559 // If we change the zoom level for the view, make sure any subsequent subframe | 1559 // If we change the zoom level for the view, make sure any subsequent subframe |
1560 // loads reflect the current zoom level. | 1560 // loads reflect the current zoom level. |
1561 page_zoom_level_ = zoom_level; | 1561 page_zoom_level_ = zoom_level; |
1562 | 1562 |
1563 webview()->setZoomLevel(zoom_level); | 1563 webview()->setZoomLevel(zoom_level); |
1564 for (auto& observer : observers_) | 1564 for (auto& observer : observers_) |
1565 observer.OnZoomLevelChanged(); | 1565 observer.OnZoomLevelChanged(); |
1566 } | 1566 } |
1567 | 1567 |
1568 void RenderViewImpl::didCancelCompositionOnSelectionChange() { | |
1569 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID())); | |
1570 } | |
1571 | |
1572 void RenderViewImpl::SetValidationMessageDirection( | 1568 void RenderViewImpl::SetValidationMessageDirection( |
1573 base::string16* wrapped_main_text, | 1569 base::string16* wrapped_main_text, |
1574 blink::WebTextDirection main_text_hint, | 1570 blink::WebTextDirection main_text_hint, |
1575 base::string16* wrapped_sub_text, | 1571 base::string16* wrapped_sub_text, |
1576 blink::WebTextDirection sub_text_hint) { | 1572 blink::WebTextDirection sub_text_hint) { |
1577 if (main_text_hint == blink::WebTextDirectionLeftToRight) { | 1573 if (main_text_hint == blink::WebTextDirectionLeftToRight) { |
1578 *wrapped_main_text = | 1574 *wrapped_main_text = |
1579 base::i18n::GetDisplayStringInLTRDirectionality(*wrapped_main_text); | 1575 base::i18n::GetDisplayStringInLTRDirectionality(*wrapped_main_text); |
1580 } else if (main_text_hint == blink::WebTextDirectionRightToLeft && | 1576 } else if (main_text_hint == blink::WebTextDirectionRightToLeft && |
1581 !base::i18n::IsRTL()) { | 1577 !base::i18n::IsRTL()) { |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2685 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2690 } | 2686 } |
2691 | 2687 |
2692 std::unique_ptr<InputEventAck> ack( | 2688 std::unique_ptr<InputEventAck> ack( |
2693 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2689 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
2694 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2690 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2695 OnInputEventAck(std::move(ack)); | 2691 OnInputEventAck(std::move(ack)); |
2696 } | 2692 } |
2697 | 2693 |
2698 } // namespace content | 2694 } // namespace content |
OLD | NEW |