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

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

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Extracting info through RHVW Created 4 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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 OnRequestCompositionUpdate) 526 OnRequestCompositionUpdate)
527 #if defined(OS_ANDROID) 527 #if defined(OS_ANDROID)
528 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck) 528 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck)
529 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, 529 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate,
530 OnRequestTextInputStateUpdate) 530 OnRequestTextInputStateUpdate)
531 IPC_MESSAGE_HANDLER(InputMsg_ImeBatchEdit, 531 IPC_MESSAGE_HANDLER(InputMsg_ImeBatchEdit,
532 OnImeBatchEdit) 532 OnImeBatchEdit)
533 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) 533 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded)
534 #endif 534 #endif
535 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) 535 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto)
536 IPC_MESSAGE_HANDLER(ViewMsg_GetFormTextInputInfo,
537 OnFormTextInputInfoRequested)
536 IPC_MESSAGE_UNHANDLED(handled = false) 538 IPC_MESSAGE_UNHANDLED(handled = false)
537 IPC_END_MESSAGE_MAP() 539 IPC_END_MESSAGE_MAP()
538 return handled; 540 return handled;
539 } 541 }
540 542
541 bool RenderWidget::Send(IPC::Message* message) { 543 bool RenderWidget::Send(IPC::Message* message) {
542 // Don't send any messages after the browser has told us to close, and filter 544 // Don't send any messages after the browser has told us to close, and filter
543 // most outgoing messages while swapped out. 545 // most outgoing messages while swapped out.
544 if ((is_swapped_out_ && 546 if ((is_swapped_out_ &&
545 !SwappedOutMessages::CanSendWhileSwappedOut(message)) || 547 !SwappedOutMessages::CanSendWhileSwappedOut(message)) ||
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 void RenderWidget::OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id) { 1527 void RenderWidget::OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id) {
1526 if (compositor_) 1528 if (compositor_)
1527 compositor_->SetFrameSinkId(frame_sink_id); 1529 compositor_->SetFrameSinkId(frame_sink_id);
1528 } 1530 }
1529 1531
1530 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { 1532 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) {
1531 if (compositor_) 1533 if (compositor_)
1532 compositor_->OnHandleCompositorProto(proto); 1534 compositor_->OnHandleCompositorProto(proto);
1533 } 1535 }
1534 1536
1537 void RenderWidget::OnFormTextInputInfoRequested(int request_id) {
1538 blink::WebTextInputInfo info = GetWebWidget()->textInputInfo();
David Trainor- moved to gerrit 2016/10/26 01:36:42 See note below. I think we want to avoid using te
1539 Send(new ViewHostMsg_SetFormTextInputInfo(
1540 routing_id(), request_id, info.value.utf8(), info.placeholder.utf8()));
1541 }
1542
1535 void RenderWidget::showImeIfNeeded() { 1543 void RenderWidget::showImeIfNeeded() {
1536 OnShowImeIfNeeded(); 1544 OnShowImeIfNeeded();
1537 } 1545 }
1538 1546
1539 ui::TextInputType RenderWidget::GetTextInputType() { 1547 ui::TextInputType RenderWidget::GetTextInputType() {
1540 #if defined(ENABLE_PLUGINS) 1548 #if defined(ENABLE_PLUGINS)
1541 if (focused_pepper_plugin_) 1549 if (focused_pepper_plugin_)
1542 return focused_pepper_plugin_->text_input_type(); 1550 return focused_pepper_plugin_->text_input_type();
1543 #endif 1551 #endif
1544 if (GetWebWidget()) 1552 if (GetWebWidget())
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 bool RenderWidget::isPointerLocked() { 2169 bool RenderWidget::isPointerLocked() {
2162 return mouse_lock_dispatcher_->IsMouseLockedTo( 2170 return mouse_lock_dispatcher_->IsMouseLockedTo(
2163 webwidget_mouse_lock_target_.get()); 2171 webwidget_mouse_lock_target_.get());
2164 } 2172 }
2165 2173
2166 blink::WebWidget* RenderWidget::GetWebWidget() const { 2174 blink::WebWidget* RenderWidget::GetWebWidget() const {
2167 return webwidget_internal_; 2175 return webwidget_internal_;
2168 } 2176 }
2169 2177
2170 } // namespace content 2178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698