Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 8907016: Spellchecker should recheck after changing language. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Patch Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 OnScrollFocusedEditableNodeIntoRect) 704 OnScrollFocusedEditableNodeIntoRect)
705 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) 705 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
706 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) 706 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
707 IPC_MESSAGE_HANDLER(ViewMsg_SetAltErrorPageURL, OnSetAltErrorPageURL) 707 IPC_MESSAGE_HANDLER(ViewMsg_SetAltErrorPageURL, OnSetAltErrorPageURL)
708 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, 708 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse,
709 OnEnumerateDirectoryResponse) 709 OnEnumerateDirectoryResponse)
710 IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse) 710 IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse)
711 IPC_MESSAGE_HANDLER(ViewMsg_ShouldClose, OnShouldClose) 711 IPC_MESSAGE_HANDLER(ViewMsg_ShouldClose, OnShouldClose)
712 IPC_MESSAGE_HANDLER(ViewMsg_SwapOut, OnSwapOut) 712 IPC_MESSAGE_HANDLER(ViewMsg_SwapOut, OnSwapOut)
713 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) 713 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
714 IPC_MESSAGE_HANDLER(ViewMsg_TextChecking, OnTextChecking)
714 IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged) 715 IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged)
715 IPC_MESSAGE_HANDLER(ViewMsg_DisassociateFromPopupCount, 716 IPC_MESSAGE_HANDLER(ViewMsg_DisassociateFromPopupCount,
716 OnDisassociateFromPopupCount) 717 OnDisassociateFromPopupCount)
717 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) 718 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
718 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) 719 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode)
719 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) 720 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground)
720 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, 721 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode,
721 OnEnablePreferredSizeChangedMode) 722 OnEnablePreferredSizeChangedMode)
722 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) 723 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize)
723 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, 724 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows,
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1080
1080 void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect( 1081 void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect(
1081 const gfx::Rect& rect) { 1082 const gfx::Rect& rect) {
1082 WebKit::WebNode node = GetFocusedNode(); 1083 WebKit::WebNode node = GetFocusedNode();
1083 if (!node.isNull()) { 1084 if (!node.isNull()) {
1084 if (IsEditableNode(node)) 1085 if (IsEditableNode(node))
1085 webview()->scrollFocusedNodeIntoRect(rect); 1086 webview()->scrollFocusedNodeIntoRect(rect);
1086 } 1087 }
1087 } 1088 }
1088 1089
1090 void RenderViewImpl::OnTextChecking() {
1091 WebNode focused_node = GetFocusedNode();
1092 if (focused_node.isNull())
1093 return;
1094
1095 WebElement root = focused_node.rootEditableElement();
1096 if (root.isNull())
1097 return;
1098
1099 webview()->focusedFrame()->requestTextChecking(root);
1100 }
1101
1089 /////////////////////////////////////////////////////////////////////////////// 1102 ///////////////////////////////////////////////////////////////////////////////
1090 1103
1091 // Tell the embedding application that the URL of the active page has changed 1104 // Tell the embedding application that the URL of the active page has changed
1092 void RenderViewImpl::UpdateURL(WebFrame* frame) { 1105 void RenderViewImpl::UpdateURL(WebFrame* frame) {
1093 WebDataSource* ds = frame->dataSource(); 1106 WebDataSource* ds = frame->dataSource();
1094 DCHECK(ds); 1107 DCHECK(ds);
1095 1108
1096 const WebURLRequest& request = ds->request(); 1109 const WebURLRequest& request = ds->request();
1097 const WebURLRequest& original_request = ds->originalRequest(); 1110 const WebURLRequest& original_request = ds->originalRequest();
1098 const WebURLResponse& response = ds->response(); 1111 const WebURLResponse& response = ds->response();
(...skipping 3849 matching lines...) Expand 10 before | Expand all | Expand 10 after
4948 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 4961 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
4949 return !!RenderThreadImpl::current()->compositor_thread(); 4962 return !!RenderThreadImpl::current()->compositor_thread();
4950 } 4963 }
4951 4964
4952 void RenderViewImpl::OnJavaBridgeInit() { 4965 void RenderViewImpl::OnJavaBridgeInit() {
4953 DCHECK(!java_bridge_dispatcher_.get()); 4966 DCHECK(!java_bridge_dispatcher_.get());
4954 #if defined(ENABLE_JAVA_BRIDGE) 4967 #if defined(ENABLE_JAVA_BRIDGE)
4955 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 4968 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
4956 #endif 4969 #endif
4957 } 4970 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698