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

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

Issue 80583002: [FYI] All-in-one OnCandidateWindow{Show,Update,Hide} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) 598 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose)
599 IPC_MESSAGE_HANDLER(ViewMsg_CreatingNew_ACK, OnCreatingNewAck) 599 IPC_MESSAGE_HANDLER(ViewMsg_CreatingNew_ACK, OnCreatingNewAck)
600 IPC_MESSAGE_HANDLER(ViewMsg_Resize, OnResize) 600 IPC_MESSAGE_HANDLER(ViewMsg_Resize, OnResize)
601 IPC_MESSAGE_HANDLER(ViewMsg_ChangeResizeRect, OnChangeResizeRect) 601 IPC_MESSAGE_HANDLER(ViewMsg_ChangeResizeRect, OnChangeResizeRect)
602 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) 602 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden)
603 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) 603 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown)
604 IPC_MESSAGE_HANDLER(ViewMsg_WasSwappedOut, OnWasSwappedOut) 604 IPC_MESSAGE_HANDLER(ViewMsg_WasSwappedOut, OnWasSwappedOut)
605 IPC_MESSAGE_HANDLER(ViewMsg_UpdateRect_ACK, OnUpdateRectAck) 605 IPC_MESSAGE_HANDLER(ViewMsg_UpdateRect_ACK, OnUpdateRectAck)
606 IPC_MESSAGE_HANDLER(ViewMsg_SwapBuffers_ACK, OnSwapBuffersComplete) 606 IPC_MESSAGE_HANDLER(ViewMsg_SwapBuffers_ACK, OnSwapBuffersComplete)
607 IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive) 607 IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive)
608 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowShow, OnCandidateWindowShow)
609 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowUpdate, OnCandidateWindowUpdate)
610 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowHide, OnCandidateWindowHide)
608 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition) 611 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition)
609 IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition) 612 IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition)
610 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize) 613 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize)
611 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) 614 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint)
612 IPC_MESSAGE_HANDLER(ViewMsg_SyntheticGestureCompleted, 615 IPC_MESSAGE_HANDLER(ViewMsg_SyntheticGestureCompleted,
613 OnSyntheticGestureCompleted) 616 OnSyntheticGestureCompleted)
614 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) 617 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
615 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) 618 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
616 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 619 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
617 #if defined(OS_ANDROID) 620 #if defined(OS_ANDROID)
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 return resizer_rect_; 2070 return resizer_rect_;
2068 } 2071 }
2069 2072
2070 void RenderWidget::OnSetInputMethodActive(bool is_active) { 2073 void RenderWidget::OnSetInputMethodActive(bool is_active) {
2071 // To prevent this renderer process from sending unnecessary IPC messages to 2074 // To prevent this renderer process from sending unnecessary IPC messages to
2072 // a browser process, we permit the renderer process to send IPC messages 2075 // a browser process, we permit the renderer process to send IPC messages
2073 // only during the input method attached to the browser process is active. 2076 // only during the input method attached to the browser process is active.
2074 input_method_is_active_ = is_active; 2077 input_method_is_active_ = is_active;
2075 } 2078 }
2076 2079
2080 void RenderWidget::OnCandidateWindowShow() {
2081 webwidget_->didShowCandidateWindow();
2082 }
2083
2084 void RenderWidget::OnCandidateWindowUpdate() {
2085 webwidget_->didUpdateCandidateWindow();
2086 }
2087
2088 void RenderWidget::OnCandidateWindowHide() {
2089 webwidget_->didHideCandidateWindow();
2090 }
2091
2077 void RenderWidget::OnImeSetComposition( 2092 void RenderWidget::OnImeSetComposition(
2078 const string16& text, 2093 const string16& text,
2079 const std::vector<WebCompositionUnderline>& underlines, 2094 const std::vector<WebCompositionUnderline>& underlines,
2080 int selection_start, int selection_end) { 2095 int selection_start, int selection_end) {
2081 if (!ShouldHandleImeEvent()) 2096 if (!ShouldHandleImeEvent())
2082 return; 2097 return;
2083 ImeEventGuard guard(this); 2098 ImeEventGuard guard(this);
2084 if (!webwidget_->setComposition( 2099 if (!webwidget_->setComposition(
2085 text, WebVector<WebCompositionUnderline>(underlines), 2100 text, WebVector<WebCompositionUnderline>(underlines),
2086 selection_start, selection_end)) { 2101 selection_start, selection_end)) {
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 GetURLForGraphicsContext3D(), 2857 GetURLForGraphicsContext3D(),
2843 gpu_channel_host.get(), 2858 gpu_channel_host.get(),
2844 use_echo_for_swap_ack, 2859 use_echo_for_swap_ack,
2845 attributes, 2860 attributes,
2846 false /* bind generates resources */, 2861 false /* bind generates resources */,
2847 limits)); 2862 limits));
2848 return context.Pass(); 2863 return context.Pass();
2849 } 2864 }
2850 2865
2851 } // namespace content 2866 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698