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

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: Plumb selection rannge with ViewHostMsg_SelectionChanged Created 9 years, 11 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 0ddfbbab5b4c39f518c095960a1c6087334ead98..5af200d78a7f044c7a505609116e88d778085205 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.
@@ -124,8 +114,6 @@ class RWHVMEditCommandHelper;
int pluginImeIdentifier_;
}
-@property(assign, nonatomic) NSRect caretRect;
-
- (void)setCanBeKeyView:(BOOL)can;
- (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
- (void)setCloseOnDeactivate:(BOOL)b;
@@ -205,7 +193,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);
virtual gfx::Rect GetWindowRect();

Powered by Google App Engine
This is Rietveld 408576698