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

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

Issue 1313553006: Implement "Look Up In Dictionary" context menu item asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: content/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index cc295afb950533e020ba0d391708a26ae1d6d7fb..2bab190b045df4d08ff8038950b6390774259f95 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -208,6 +208,7 @@ class Layer;
- (void)updateCursor:(NSCursor*)cursor;
- (NSRect)firstViewRectForCharacterRange:(NSRange)theRange
actualRange:(NSRangePointer)actualRange;
+- (void) ShowLookUpDictionary:(NSPoint)point;
Alexei Svitkine (slow) 2015/09/01 16:27:03 Nit: Use objc naming convention please. e.g. - (
Shu Chen 2015/09/02 03:35:42 Done.
@end
namespace content {
@@ -362,6 +363,9 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
void PluginImeCompositionCompleted(const base::string16& text, int plugin_id);
const std::string& selected_text() const { return selected_text_; }
+ const gfx::Range& composition_range() const { return composition_range_; }
+ const base::string16& selection_text() const { return selection_text_; }
+ size_t selection_text_offset() const { return selection_text_offset_; }
// Returns true and stores first rectangle for character range if the
// requested |range| is already cached, otherwise returns false.
@@ -587,6 +591,9 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// The current caret bounds.
gfx::Rect caret_rect_;
+ // The current first selection bounds.
+ gfx::Rect first_selection_rect_;
+
// Factory used to safely scope delayed calls to ShutdownHost().
base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698