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

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

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Rebased Created 4 years, 3 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 class ExternalPopupMenu; 91 class ExternalPopupMenu;
92 class FrameSwapMessageQueue; 92 class FrameSwapMessageQueue;
93 class ImeEventGuard; 93 class ImeEventGuard;
94 class PepperPluginInstanceImpl; 94 class PepperPluginInstanceImpl;
95 class RenderFrameImpl; 95 class RenderFrameImpl;
96 class RenderFrameProxy; 96 class RenderFrameProxy;
97 class RenderWidgetCompositor; 97 class RenderWidgetCompositor;
98 class RenderWidgetOwnerDelegate; 98 class RenderWidgetOwnerDelegate;
99 class RenderWidgetScreenMetricsEmulator; 99 class RenderWidgetScreenMetricsEmulator;
100 class ResizingModeSelector; 100 class ResizingModeSelector;
101 class TextInputClientObserver;
101 struct ContextMenuParams; 102 struct ContextMenuParams;
102 struct ResizeParams; 103 struct ResizeParams;
103 104
104 // RenderWidget provides a communication bridge between a WebWidget and 105 // RenderWidget provides a communication bridge between a WebWidget and
105 // a RenderWidgetHost, the latter of which lives in a different process. 106 // a RenderWidgetHost, the latter of which lives in a different process.
106 // 107 //
107 // RenderWidget is used to implement: 108 // RenderWidget is used to implement:
108 // - RenderViewImpl (deprecated) 109 // - RenderViewImpl (deprecated)
109 // - Fullscreen mode (RenderWidgetFullScreen) 110 // - Fullscreen mode (RenderWidgetFullScreen)
110 // - Popup "menus" (like the color chooser and date picker) 111 // - Popup "menus" (like the color chooser and date picker)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // screen coordinates. 393 // screen coordinates.
393 gfx::Rect RootWindowRect(); 394 gfx::Rect RootWindowRect();
394 395
395 // Indicates whether this widget has focus. 396 // Indicates whether this widget has focus.
396 bool has_focus() const { return has_focus_; } 397 bool has_focus() const { return has_focus_; }
397 398
398 MouseLockDispatcher* mouse_lock_dispatcher() { 399 MouseLockDispatcher* mouse_lock_dispatcher() {
399 return mouse_lock_dispatcher_.get(); 400 return mouse_lock_dispatcher_.get();
400 } 401 }
401 402
403 // TODO(ekaramad): The reference to the focused pepper plugin will be removed
404 // from RenderWidget. The purpose of having the reference here was to make IME
405 // work for OOPIF (https://crbug.com/643727).
402 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) { 406 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) {
403 focused_pepper_plugin_ = plugin; 407 focused_pepper_plugin_ = plugin;
404 } 408 }
405 409
406 // When emulated, this returns original device scale factor. 410 // When emulated, this returns original device scale factor.
407 float GetOriginalDeviceScaleFactor() const; 411 float GetOriginalDeviceScaleFactor() const;
408 412
409 protected: 413 protected:
410 // Friend RefCounted so that the dtor can be non-public. Using this class 414 // Friend RefCounted so that the dtor can be non-public. Using this class
411 // without ref-counting is an error. 415 // without ref-counting is an error.
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 // Mouse Lock dispatcher attached to this view. 812 // Mouse Lock dispatcher attached to this view.
809 std::unique_ptr<RenderWidgetMouseLockDispatcher> mouse_lock_dispatcher_; 813 std::unique_ptr<RenderWidgetMouseLockDispatcher> mouse_lock_dispatcher_;
810 814
811 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. 815 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface.
812 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; 816 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
813 817
814 private: 818 private:
815 // Indicates whether this widget has focus. 819 // Indicates whether this widget has focus.
816 bool has_focus_; 820 bool has_focus_;
817 821
822 #if defined(OS_MACOSX)
823 // Responds to IPCs from TextInputClientMac regarding getting string at given
824 // position or range as well as finding character index at a given position.
825 std::unique_ptr<TextInputClientObserver> text_input_client_observer_;
826 #endif
827
818 // This reference is set by the RenderFrame and is used to query the IME- 828 // This reference is set by the RenderFrame and is used to query the IME-
819 // related state from the plugin to later send to the browser. 829 // related state from the plugin to later send to the browser.
820 PepperPluginInstanceImpl* focused_pepper_plugin_; 830 PepperPluginInstanceImpl* focused_pepper_plugin_;
821 831
822 // Stores edit commands associated to the next key event. 832 // Stores edit commands associated to the next key event.
823 // Will be cleared as soon as the next key event is processed. 833 // Will be cleared as soon as the next key event is processed.
824 EditCommands edit_commands_; 834 EditCommands edit_commands_;
825 835
826 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 836 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
827 }; 837 };
828 838
829 } // namespace content 839 } // namespace content
830 840
831 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 841 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698