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

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: Work on IME Created 9 years, 10 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 160197cf6d00892c2d22454c833d4fdcbb7b71f6..28274c6c45840d3a4eb07fdea302e352a561522e 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!

Powered by Google App Engine
This is Rietveld 408576698