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

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

Issue 2029423003: OOPIF IME: Renderer Side Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undid Changes to render_frame_impl.h Created 4 years, 6 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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 namespace scheduler { 77 namespace scheduler {
78 class RenderWidgetSchedulingState; 78 class RenderWidgetSchedulingState;
79 } 79 }
80 80
81 namespace content { 81 namespace content {
82 class CompositorDependencies; 82 class CompositorDependencies;
83 class ExternalPopupMenu; 83 class ExternalPopupMenu;
84 class FrameSwapMessageQueue; 84 class FrameSwapMessageQueue;
85 class ImeEventGuard; 85 class ImeEventGuard;
86 class PepperPluginInstanceImpl;
86 class RenderFrameImpl; 87 class RenderFrameImpl;
87 class RenderFrameProxy; 88 class RenderFrameProxy;
88 class RenderWidgetCompositor; 89 class RenderWidgetCompositor;
89 class RenderWidgetOwnerDelegate; 90 class RenderWidgetOwnerDelegate;
90 class RenderWidgetScreenMetricsEmulator; 91 class RenderWidgetScreenMetricsEmulator;
91 class ResizingModeSelector; 92 class ResizingModeSelector;
92 struct ContextMenuParams; 93 struct ContextMenuParams;
93 struct DidOverscrollParams; 94 struct DidOverscrollParams;
94 struct ResizeParams; 95 struct ResizeParams;
95 96
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // handle composition range and composition character bounds. 359 // handle composition range and composition character bounds.
359 void UpdateCompositionInfo(bool should_update_range); 360 void UpdateCompositionInfo(bool should_update_range);
360 361
361 // Change the device ICC color profile while running a layout test. 362 // Change the device ICC color profile while running a layout test.
362 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); 363 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile);
363 void ResetDeviceColorProfileForTesting(); 364 void ResetDeviceColorProfileForTesting();
364 365
365 // Indicates whether this widget has focus. 366 // Indicates whether this widget has focus.
366 bool has_focus() const { return has_focus_; } 367 bool has_focus() const { return has_focus_; }
367 368
369 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) {
370 focused_pepper_plugin_ = plugin;
371 }
372
368 protected: 373 protected:
369 // Friend RefCounted so that the dtor can be non-public. Using this class 374 // Friend RefCounted so that the dtor can be non-public. Using this class
370 // without ref-counting is an error. 375 // without ref-counting is an error.
371 friend class base::RefCounted<RenderWidget>; 376 friend class base::RefCounted<RenderWidget>;
372 377
373 // For unit tests. 378 // For unit tests.
374 friend class RenderWidgetTest; 379 friend class RenderWidgetTest;
375 380
376 enum ResizeAck { 381 enum ResizeAck {
377 SEND_RESIZE_ACK, 382 SEND_RESIZE_ACK,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 void OnRequestMoveAck(); 456 void OnRequestMoveAck();
452 virtual void OnImeSetComposition( 457 virtual void OnImeSetComposition(
453 const base::string16& text, 458 const base::string16& text,
454 const std::vector<blink::WebCompositionUnderline>& underlines, 459 const std::vector<blink::WebCompositionUnderline>& underlines,
455 const gfx::Range& replacement_range, 460 const gfx::Range& replacement_range,
456 int selection_start, 461 int selection_start,
457 int selection_end); 462 int selection_end);
458 virtual void OnImeConfirmComposition(const base::string16& text, 463 virtual void OnImeConfirmComposition(const base::string16& text,
459 const gfx::Range& replacement_range, 464 const gfx::Range& replacement_range,
460 bool keep_selection); 465 bool keep_selection);
466
kenrb 2016/06/10 20:52:03 Nit: new line not needed.
EhsanK 2016/06/27 21:14:49 Done.
461 // Called when the device scale factor is changed, or the layer tree is 467 // Called when the device scale factor is changed, or the layer tree is
462 // initialized. 468 // initialized.
463 virtual void OnDeviceScaleFactorChanged(); 469 virtual void OnDeviceScaleFactorChanged();
464 470
465 void OnRepaint(gfx::Size size_to_paint); 471 void OnRepaint(gfx::Size size_to_paint);
466 void OnSyntheticGestureCompleted(); 472 void OnSyntheticGestureCompleted();
467 void OnSetTextDirection(blink::WebTextDirection direction); 473 void OnSetTextDirection(blink::WebTextDirection direction);
468 void OnGetFPS(); 474 void OnGetFPS();
469 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, 475 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
470 const gfx::Rect& window_screen_rect); 476 const gfx::Rect& window_screen_rect);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 std::unique_ptr<scheduler::RenderWidgetSchedulingState> 765 std::unique_ptr<scheduler::RenderWidgetSchedulingState>
760 render_widget_scheduling_state_; 766 render_widget_scheduling_state_;
761 767
762 private: 768 private:
763 // When emulated, this returns original device scale factor. 769 // When emulated, this returns original device scale factor.
764 float GetOriginalDeviceScaleFactor() const; 770 float GetOriginalDeviceScaleFactor() const;
765 771
766 // Indicates whether this widget has focus. 772 // Indicates whether this widget has focus.
767 bool has_focus_; 773 bool has_focus_;
768 774
775 // This reference is set by the RenderFrame and is used to query the IME-
776 // related state from the plugin to later send to the browser.
777 PepperPluginInstanceImpl* focused_pepper_plugin_;
778
769 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 779 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
770 }; 780 };
771 781
772 } // namespace content 782 } // namespace content
773 783
774 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 784 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698