| 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 36a23e818b695ceea7f0e95d546fbfc9526dfc13..45aa82120e08ea51809513c50c6399ce8e89401c 100644
|
| --- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
|
| +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -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.
|
| @@ -127,7 +117,7 @@ class RWHVMEditCommandHelper;
|
| BOOL pluginImeActive_;
|
| }
|
|
|
| -@property(assign, nonatomic) NSRect caretRect;
|
| +@property(nonatomic, readonly) NSRange selectedRange;
|
|
|
| - (void)setCanBeKeyView:(BOOL)can;
|
| - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
|
| @@ -202,6 +192,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
|
| virtual void ImeUpdateTextInputState(WebKit::WebTextInputType state,
|
| const gfx::Rect& caret_rect);
|
| virtual void ImeCancelComposition();
|
| + virtual void ImeCompositionRangeChanged(int start, int end);
|
| virtual void DidUpdateBackingStore(
|
| const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy,
|
| const std::vector<gfx::Rect>& copy_rects);
|
| @@ -210,7 +201,7 @@ 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, int start, int end);
|
| virtual BackingStore* AllocBackingStore(const gfx::Size& size);
|
| virtual void SetTakesFocusOnlyOnMouseDown(bool flag);
|
| // See comment in RenderWidgetHostView!
|
|
|