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

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

Issue 712723002: suppress link disambiguation popup when virtual keyboard requested (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix linux build Created 6 years, 1 month 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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 view->TakeFocus(reverse); 1199 view->TakeFocus(reverse);
1200 } 1200 }
1201 1201
1202 void RenderViewHostImpl::OnFocusedNodeChanged(bool is_editable_node) { 1202 void RenderViewHostImpl::OnFocusedNodeChanged(bool is_editable_node) {
1203 is_focused_element_editable_ = is_editable_node; 1203 is_focused_element_editable_ = is_editable_node;
1204 if (view_) 1204 if (view_)
1205 view_->FocusedNodeChanged(is_editable_node); 1205 view_->FocusedNodeChanged(is_editable_node);
1206 #if defined(OS_WIN) 1206 #if defined(OS_WIN)
1207 if (!is_editable_node && virtual_keyboard_requested_) { 1207 if (!is_editable_node && virtual_keyboard_requested_) {
1208 virtual_keyboard_requested_ = false; 1208 virtual_keyboard_requested_ = false;
1209 delegate_->SetIsVirtualKeyboardRequested(false);
1209 BrowserThread::PostDelayedTask( 1210 BrowserThread::PostDelayedTask(
1210 BrowserThread::UI, FROM_HERE, 1211 BrowserThread::UI, FROM_HERE,
1211 base::Bind(base::IgnoreResult(&DismissVirtualKeyboardTask)), 1212 base::Bind(base::IgnoreResult(&DismissVirtualKeyboardTask)),
1212 TimeDelta::FromMilliseconds(kVirtualKeyboardDisplayWaitTimeoutMs)); 1213 TimeDelta::FromMilliseconds(kVirtualKeyboardDisplayWaitTimeoutMs));
1213 } 1214 }
1214 #endif 1215 #endif
1215 NotificationService::current()->Notify( 1216 NotificationService::current()->Notify(
1216 NOTIFICATION_FOCUS_CHANGED_IN_PAGE, 1217 NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
1217 Source<RenderViewHost>(this), 1218 Source<RenderViewHost>(this),
1218 Details<const bool>(&is_editable_node)); 1219 Details<const bool>(&is_editable_node));
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 } 1417 }
1417 1418
1418 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { 1419 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
1419 delegate_->RunFileChooser(this, params); 1420 delegate_->RunFileChooser(this, params);
1420 } 1421 }
1421 1422
1422 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) { 1423 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) {
1423 #if defined(OS_WIN) 1424 #if defined(OS_WIN)
1424 if (editable) { 1425 if (editable) {
1425 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard(); 1426 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard();
1427 delegate_->SetIsVirtualKeyboardRequested(true);
1426 } else { 1428 } else {
1427 virtual_keyboard_requested_ = false; 1429 virtual_keyboard_requested_ = false;
1430 delegate_->SetIsVirtualKeyboardRequested(false);
1428 base::win::DismissVirtualKeyboard(); 1431 base::win::DismissVirtualKeyboard();
1429 } 1432 }
1430 #endif 1433 #endif
1431 } 1434 }
1432 1435
1433 bool RenderViewHostImpl::CanAccessFilesOfPageState( 1436 bool RenderViewHostImpl::CanAccessFilesOfPageState(
1434 const PageState& state) const { 1437 const PageState& state) const {
1435 ChildProcessSecurityPolicyImpl* policy = 1438 ChildProcessSecurityPolicyImpl* policy =
1436 ChildProcessSecurityPolicyImpl::GetInstance(); 1439 ChildProcessSecurityPolicyImpl::GetInstance();
1437 1440
(...skipping 10 matching lines...) Expand all
1448 FrameTree* frame_tree = delegate_->GetFrameTree(); 1451 FrameTree* frame_tree = delegate_->GetFrameTree();
1449 1452
1450 frame_tree->ResetForMainFrameSwap(); 1453 frame_tree->ResetForMainFrameSwap();
1451 } 1454 }
1452 1455
1453 void RenderViewHostImpl::SelectWordAroundCaret() { 1456 void RenderViewHostImpl::SelectWordAroundCaret() {
1454 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1457 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1455 } 1458 }
1456 1459
1457 } // namespace content 1460 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698