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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 442433002: Not allowing user to type more chars than max length value for text field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: few nits resolved Created 6 years, 4 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
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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 Source<RenderViewHost>(this), 1261 Source<RenderViewHost>(this),
1262 NotificationService::NoDetails()); 1262 NotificationService::NoDetails());
1263 } 1263 }
1264 1264
1265 void RenderViewHostImpl::OnTakeFocus(bool reverse) { 1265 void RenderViewHostImpl::OnTakeFocus(bool reverse) {
1266 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 1266 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1267 if (view) 1267 if (view)
1268 view->TakeFocus(reverse); 1268 view->TakeFocus(reverse);
1269 } 1269 }
1270 1270
1271 void RenderViewHostImpl::OnFocusedNodeChanged(bool is_editable_node) { 1271 void RenderViewHostImpl::OnFocusedNodeChanged(bool is_editable_node,
1272 int editable_node_max_length) {
1272 is_focused_element_editable_ = is_editable_node; 1273 is_focused_element_editable_ = is_editable_node;
1273 if (view_) 1274 if (view_)
1274 view_->FocusedNodeChanged(is_editable_node); 1275 view_->FocusedNodeChanged(is_editable_node, editable_node_max_length);
1275 #if defined(OS_WIN) 1276 #if defined(OS_WIN)
1276 if (!is_editable_node && virtual_keyboard_requested_) { 1277 if (!is_editable_node && virtual_keyboard_requested_) {
1277 virtual_keyboard_requested_ = false; 1278 virtual_keyboard_requested_ = false;
1278 BrowserThread::PostDelayedTask( 1279 BrowserThread::PostDelayedTask(
1279 BrowserThread::UI, FROM_HERE, 1280 BrowserThread::UI, FROM_HERE,
1280 base::Bind(base::IgnoreResult(&DismissVirtualKeyboardTask)), 1281 base::Bind(base::IgnoreResult(&DismissVirtualKeyboardTask)),
1281 TimeDelta::FromMilliseconds(kVirtualKeyboardDisplayWaitTimeoutMs)); 1282 TimeDelta::FromMilliseconds(kVirtualKeyboardDisplayWaitTimeoutMs));
1282 } 1283 }
1283 #endif 1284 #endif
1284 NotificationService::current()->Notify( 1285 NotificationService::current()->Notify(
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 FrameTree* frame_tree = delegate_->GetFrameTree(); 1581 FrameTree* frame_tree = delegate_->GetFrameTree();
1581 1582
1582 frame_tree->ResetForMainFrameSwap(); 1583 frame_tree->ResetForMainFrameSwap();
1583 } 1584 }
1584 1585
1585 void RenderViewHostImpl::SelectWordAroundCaret() { 1586 void RenderViewHostImpl::SelectWordAroundCaret() {
1586 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1587 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1587 } 1588 }
1588 1589
1589 } // namespace content 1590 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698