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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 1234193002: Simplify InputMethodWin initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test failures on Android. Created 5 years, 5 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void ShowContextMenuAtPoint(const gfx::Point& point) override; 297 void ShowContextMenuAtPoint(const gfx::Point& point) override;
298 298
299 // Queues a synthetic gesture for testing purposes. Invokes the on_complete 299 // Queues a synthetic gesture for testing purposes. Invokes the on_complete
300 // callback when the gesture is finished running. 300 // callback when the gesture is finished running.
301 void QueueSyntheticGesture( 301 void QueueSyntheticGesture(
302 scoped_ptr<SyntheticGesture> synthetic_gesture, 302 scoped_ptr<SyntheticGesture> synthetic_gesture,
303 const base::Callback<void(SyntheticGesture::Result)>& on_complete); 303 const base::Callback<void(SyntheticGesture::Result)>& on_complete);
304 304
305 void CancelUpdateTextDirection(); 305 void CancelUpdateTextDirection();
306 306
307 // Notifies the renderer whether or not the input method attached to this
308 // process is activated.
309 // When the input method is activated, a renderer process sends IPC messages
310 // to notify the status of its composition node. (This message is mainly used
311 // for notifying the position of the input cursor so that the browser can
312 // display input method windows under the cursor.)
313 void SetInputMethodActive(bool activate);
314
315 // Update the composition node of the renderer (or WebKit). 307 // Update the composition node of the renderer (or WebKit).
316 // WebKit has a special node (a composition node) for input method to change 308 // WebKit has a special node (a composition node) for input method to change
317 // its text without affecting any other DOM nodes. When the input method 309 // its text without affecting any other DOM nodes. When the input method
318 // (attached to the browser) updates its text, the browser sends IPC messages 310 // (attached to the browser) updates its text, the browser sends IPC messages
319 // to update the composition node of the renderer. 311 // to update the composition node of the renderer.
320 // (Read the comments of each function for its detail.) 312 // (Read the comments of each function for its detail.)
321 313
322 // Sets the text of the composition node. 314 // Sets the text of the composition node.
323 // This function can also update the cursor position and mark the specified 315 // This function can also update the cursor position and mark the specified
324 // range in the composition node. 316 // range in the composition node.
(...skipping 22 matching lines...) Expand all
347 void ImeCancelComposition(); 339 void ImeCancelComposition();
348 340
349 // This is for derived classes to give us access to the resizer rect. 341 // This is for derived classes to give us access to the resizer rect.
350 // And to also expose it to the RenderWidgetHostView. 342 // And to also expose it to the RenderWidgetHostView.
351 virtual gfx::Rect GetRootWindowResizerRect() const; 343 virtual gfx::Rect GetRootWindowResizerRect() const;
352 344
353 bool ignore_input_events() const { 345 bool ignore_input_events() const {
354 return ignore_input_events_; 346 return ignore_input_events_;
355 } 347 }
356 348
357 bool input_method_active() const {
358 return input_method_active_;
359 }
360
361 // Whether forwarded WebInputEvents should be ignored. True if either 349 // Whether forwarded WebInputEvents should be ignored. True if either
362 // |ignore_input_events_| or |process_->IgnoreInputEvents()| is true. 350 // |ignore_input_events_| or |process_->IgnoreInputEvents()| is true.
363 bool IgnoreInputEvents() const; 351 bool IgnoreInputEvents() const;
364 352
365 bool has_touch_handler() const { return has_touch_handler_; } 353 bool has_touch_handler() const { return has_touch_handler_; }
366 354
367 // Notification that the user has made some kind of input that could 355 // Notification that the user has made some kind of input that could
368 // perform an action. See OnUserGesture for more details. 356 // perform an action. See OnUserGesture for more details.
369 void StartUserGesture(); 357 void StartUserGesture();
370 358
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 // Flag to detect recursive calls to GetBackingStore(). 748 // Flag to detect recursive calls to GetBackingStore().
761 bool in_get_backing_store_; 749 bool in_get_backing_store_;
762 750
763 // Used for UMA histogram logging to measure the time for a repaint view 751 // Used for UMA histogram logging to measure the time for a repaint view
764 // operation to finish. 752 // operation to finish.
765 base::TimeTicks repaint_start_time_; 753 base::TimeTicks repaint_start_time_;
766 754
767 // Set to true if we shouldn't send input events from the render widget. 755 // Set to true if we shouldn't send input events from the render widget.
768 bool ignore_input_events_; 756 bool ignore_input_events_;
769 757
770 // Indicates whether IME is active.
771 bool input_method_active_;
772
773 // Set when we update the text direction of the selected input element. 758 // Set when we update the text direction of the selected input element.
774 bool text_direction_updated_; 759 bool text_direction_updated_;
775 blink::WebTextDirection text_direction_; 760 blink::WebTextDirection text_direction_;
776 761
777 // Set when we cancel updating the text direction. 762 // Set when we cancel updating the text direction.
778 // This flag also ignores succeeding update requests until we call 763 // This flag also ignores succeeding update requests until we call
779 // NotifyTextDirection(). 764 // NotifyTextDirection().
780 bool text_direction_canceled_; 765 bool text_direction_canceled_;
781 766
782 // Indicates if the next sequence of Char events should be suppressed or not. 767 // Indicates if the next sequence of Char events should be suppressed or not.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 bool is_focused_; 818 bool is_focused_;
834 819
835 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 820 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
836 821
837 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 822 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
838 }; 823 };
839 824
840 } // namespace content 825 } // namespace content
841 826
842 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 827 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698