| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 | 1508 |
| 1509 bool RenderViewImpl::isSelectTrailingWhitespaceEnabled() { | 1509 bool RenderViewImpl::isSelectTrailingWhitespaceEnabled() { |
| 1510 #if defined(OS_WIN) | 1510 #if defined(OS_WIN) |
| 1511 return true; | 1511 return true; |
| 1512 #else | 1512 #else |
| 1513 return false; | 1513 return false; |
| 1514 #endif | 1514 #endif |
| 1515 } | 1515 } |
| 1516 | 1516 |
| 1517 void RenderViewImpl::didChangeSelection(bool is_empty_selection) { | 1517 void RenderViewImpl::didChangeSelection(bool is_empty_selection) { |
| 1518 // TODO(penghuang): Enable this on Window to support IME reconversion. | |
| 1519 // http://crbug.com/100220 | |
| 1520 #if defined(OS_POSIX) | |
| 1521 if (!handling_input_event_ && !handling_select_range_) | 1518 if (!handling_input_event_ && !handling_select_range_) |
| 1522 return; | 1519 return; |
| 1523 handling_select_range_ = false; | 1520 handling_select_range_ = false; |
| 1524 | 1521 |
| 1525 SyncSelectionIfRequired(); | 1522 SyncSelectionIfRequired(); |
| 1526 #endif // defined(OS_POSIX) | |
| 1527 } | 1523 } |
| 1528 | 1524 |
| 1529 void RenderViewImpl::didExecuteCommand(const WebString& command_name) { | 1525 void RenderViewImpl::didExecuteCommand(const WebString& command_name) { |
| 1530 const std::string& name = UTF16ToUTF8(command_name); | 1526 const std::string& name = UTF16ToUTF8(command_name); |
| 1531 if (StartsWithASCII(name, "Move", true) || | 1527 if (StartsWithASCII(name, "Move", true) || |
| 1532 StartsWithASCII(name, "Insert", true) || | 1528 StartsWithASCII(name, "Insert", true) || |
| 1533 StartsWithASCII(name, "Delete", true)) | 1529 StartsWithASCII(name, "Delete", true)) |
| 1534 return; | 1530 return; |
| 1535 RenderThreadImpl::current()->RecordUserMetrics(name); | 1531 RenderThreadImpl::current()->RecordUserMetrics(name); |
| 1536 } | 1532 } |
| (...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4651 | 4647 |
| 4652 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4648 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 4653 return webview()->settings()->useThreadedCompositor(); | 4649 return webview()->settings()->useThreadedCompositor(); |
| 4654 } | 4650 } |
| 4655 | 4651 |
| 4656 void RenderViewImpl::OnJavaBridgeInit( | 4652 void RenderViewImpl::OnJavaBridgeInit( |
| 4657 const IPC::ChannelHandle& channel_handle) { | 4653 const IPC::ChannelHandle& channel_handle) { |
| 4658 DCHECK(!java_bridge_dispatcher_.get()); | 4654 DCHECK(!java_bridge_dispatcher_.get()); |
| 4659 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4655 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
| 4660 } | 4656 } |
| OLD | NEW |