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

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

Issue 2164483006: [MacViews] Implemented text context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 3 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: 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 13f83836ff46ace3b9b10cedef631db313bd0397..6c1efb1d4c7ebd1e3b7564dc195d850daa9a8752 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -267,10 +267,7 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
void SetShowingContextMenu(bool showing) override;
void SetActive(bool active) override;
void ShowDefinitionForSelection() override;
- bool SupportsSpeech() const override;
void SpeakSelection() override;
- bool IsSpeaking() const override;
- void StopSpeaking() override;
void SetBackgroundColor(SkColor color) override;
void SetNeedsBeginFrames(bool needs_begin_frames) override;
@@ -372,7 +369,7 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
void SetTextInputActive(bool active);
- const std::string& selected_text() const { return selected_text_; }
+ const base::string16& 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_; }
@@ -483,14 +480,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
void ShutdownHost();
// IPC message handlers.
+ // TODO(spqchan): Change |text| to be the type string16.
void OnGetRenderedTextCompleted(const std::string& text);
// Send updated vsync parameters to the top level display.
void UpdateDisplayVSyncParameters();
- // Dispatches a TTS session.
- void SpeakText(const std::string& text);
-
// Get the focused view that should be used for retrieving the text selection.
RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
@@ -518,8 +513,8 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// RenderWidgetHostViewGuest.
bool is_guest_view_hack_;
- // selected text on the renderer.
- std::string selected_text_;
+ // Selected text on the renderer.
+ base::string16 selected_text_;
// The window used for popup widgets.
base::scoped_nsobject<NSWindow> popup_window_;
@@ -550,7 +545,8 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// TODO(ekaramad): Remove the following locals and get the selection
// information directly from TextInputManager.
- // A buffer containing the text inside and around the current selection range.
+ // A buffer containing the text inside and around the current selection
+ // range. This is for text selected in an editable element.
base::string16 selection_text_;
// The offset of the text stored in |selection_text_| relative to the start of

Powered by Google App Engine
This is Rietveld 408576698