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 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2612 selection_text_.clear(); | 2612 selection_text_.clear(); |
2613 | 2613 |
2614 // UpdateTextInputType should be called before SyncSelectionIfRequired. | 2614 // UpdateTextInputType should be called before SyncSelectionIfRequired. |
2615 // UpdateTextInputType may send TextInputTypeChanged to notify the focus | 2615 // UpdateTextInputType may send TextInputTypeChanged to notify the focus |
2616 // was changed, and SyncSelectionIfRequired may send SelectionChanged | 2616 // was changed, and SyncSelectionIfRequired may send SelectionChanged |
2617 // to notify the selection was changed. Focus change should be notified | 2617 // to notify the selection was changed. Focus change should be notified |
2618 // before selection change. | 2618 // before selection change. |
2619 UpdateTextInputType(); | 2619 UpdateTextInputType(); |
2620 SyncSelectionIfRequired(); | 2620 SyncSelectionIfRequired(); |
2621 #if defined(OS_ANDROID) | 2621 #if defined(OS_ANDROID) |
2622 UpdateTextInputState(false, true); | 2622 UpdateTextInputState(true, true); |
aurimas (slooooooooow)
2013/12/02 23:15:05
Selection change is not the same as focus(), this
| |
2623 #endif | 2623 #endif |
2624 } | 2624 } |
2625 | 2625 |
2626 void RenderViewImpl::didExecuteCommand(const WebString& command_name) { | 2626 void RenderViewImpl::didExecuteCommand(const WebString& command_name) { |
2627 const std::string& name = UTF16ToUTF8(command_name); | 2627 const std::string& name = UTF16ToUTF8(command_name); |
2628 if (StartsWithASCII(name, "Move", true) || | 2628 if (StartsWithASCII(name, "Move", true) || |
2629 StartsWithASCII(name, "Insert", true) || | 2629 StartsWithASCII(name, "Insert", true) || |
2630 StartsWithASCII(name, "Delete", true)) | 2630 StartsWithASCII(name, "Delete", true)) |
2631 return; | 2631 return; |
2632 RenderThreadImpl::current()->RecordUserMetrics(name); | 2632 RenderThreadImpl::current()->RecordUserMetrics(name); |
(...skipping 4050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6683 for (size_t i = 0; i < icon_urls.size(); i++) { | 6683 for (size_t i = 0; i < icon_urls.size(); i++) { |
6684 WebURL url = icon_urls[i].iconURL(); | 6684 WebURL url = icon_urls[i].iconURL(); |
6685 if (!url.isEmpty()) | 6685 if (!url.isEmpty()) |
6686 urls.push_back(FaviconURL(url, | 6686 urls.push_back(FaviconURL(url, |
6687 ToFaviconType(icon_urls[i].iconType()))); | 6687 ToFaviconType(icon_urls[i].iconType()))); |
6688 } | 6688 } |
6689 SendUpdateFaviconURL(urls); | 6689 SendUpdateFaviconURL(urls); |
6690 } | 6690 } |
6691 | 6691 |
6692 } // namespace content | 6692 } // namespace content |
OLD | NEW |