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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.h

Issue 6289009: [Mac] Implement the system dictionary popup by implementing NSTextInput methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Clang Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index 048f4027345a8fa7a4bd382f9c080ed310b9624d..576ce97768cfd5ee7e37b59b4c1d34ec32a76dce 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -73,12 +73,6 @@ class RWHVMEditCommandHelper;
// Represents the input-method attributes supported by this object.
scoped_nsobject<NSArray> validAttributesForMarkedText_;
- // Represents the cursor position in this view coordinate.
- // The renderer sends the cursor position through an IPC message.
- // We save the latest cursor position here and return it when an input
- // methods needs it.
- NSRect caretRect_;
-
// Indicates if we are currently handling a key down event.
BOOL handlingKeyDown_;
@@ -95,11 +89,7 @@ class RWHVMEditCommandHelper;
// the whole content yet.
NSRange markedRange_;
- // The selected range inside current marked text.
- // TODO(suzhe): Currently it's only valid when there is any marked text.
- // In the future, we may need to support accessing the whole content of the
- // DOM node being edited, then this should be the selected range inside the
- // DOM node.
+ // The selected range, cached from a message sent by the renderer.
NSRange selectedRange_;
// Text to be inserted which was generated by handling a key down event.
@@ -130,7 +120,7 @@ class RWHVMEditCommandHelper;
BOOL mouseEventWasIgnored_;
}
-@property(assign, nonatomic) NSRect caretRect;
+@property(nonatomic, readonly) NSRange selectedRange;
- (void)setCanBeKeyView:(BOOL)can;
- (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
@@ -206,6 +196,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void ImeUpdateTextInputState(WebKit::WebTextInputType state,
const gfx::Rect& caret_rect);
virtual void ImeCancelComposition();
+ virtual void ImeCompositionRangeChanged(const ui::Range& range);
virtual void DidUpdateBackingStore(
const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy,
const std::vector<gfx::Rect>& copy_rects);
@@ -214,7 +205,8 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {};
virtual void Destroy();
virtual void SetTooltipText(const std::wstring& tooltip_text);
- virtual void SelectionChanged(const std::string& text);
+ virtual void SelectionChanged(const std::string& text,
+ const ui::Range& range);
virtual BackingStore* AllocBackingStore(const gfx::Size& size);
virtual void SetTakesFocusOnlyOnMouseDown(bool flag);
// See comment in RenderWidgetHostView!

Powered by Google App Engine
This is Rietveld 408576698