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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.h

Issue 63145: Copy text selection from renderer to browser every time it changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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_gtk.h
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_gtk.h (revision 13391)
+++ chrome/browser/renderer_host/render_widget_host_view_gtk.h (working copy)
@@ -61,8 +61,7 @@
void RenderViewGone();
void Destroy();
void SetTooltipText(const std::wstring& tooltip_text);
- void SelectionChanged();
- void SetSelectionText(const std::string& text);
+ void SelectionChanged(const std::string& text);
void PasteFromSelectionClipboard();
BackingStore* AllocBackingStore(const gfx::Size& size);
// ---------------------------------------------------------------------------
@@ -74,16 +73,9 @@
private:
friend class RenderWidgetHostViewGtkWidget;
- void set_event_selection(GdkEventSelection* event_selection) {
- event_selection_ = *event_selection;
- event_selection_active_ = true;
- }
-
// Update the display cursor for the render view.
void ShowCurrentCursor();
- void RequestSelectionText();
-
// When we've requested the text from the X clipboard, GTK returns it to us
// through this callback.
static void ReceivedSelectionText(GtkClipboard* clipboard,
@@ -115,17 +107,6 @@
// The cursor for the page. This is passed up from the renderer.
WebCursor current_cursor_;
-
- // We cache the text that is selected on the page. This is used for copying to
- // the X clipboard. We update |selection_text_| whenever X asks us for it and
- // the cache is empty. We invalidate it (set it to empty) whenever the
- // renderer sends a SelectionChanged message.
- std::string selection_text_;
-
- // A struct that keeps state for the XSelectionEvent we are handling (if any).
- GdkEventSelection event_selection_;
- // Tracks whether we are currently handling an XSelectionEvent.
- bool event_selection_active_;
};
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_

Powered by Google App Engine
This is Rietveld 408576698