| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
| 6 | 6 |
| 7 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
| 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
| 9 // badly with net::URLRequestStatus::Status. | 9 // badly with net::URLRequestStatus::Status. |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 gtk_widget_set_has_tooltip(view_.get(), FALSE); | 782 gtk_widget_set_has_tooltip(view_.get(), FALSE); |
| 783 } else { | 783 } else { |
| 784 gtk_widget_set_tooltip_text(view_.get(), | 784 gtk_widget_set_tooltip_text(view_.get(), |
| 785 UTF16ToUTF8(clamped_tooltip).c_str()); | 785 UTF16ToUTF8(clamped_tooltip).c_str()); |
| 786 #if defined(OS_CHROMEOS) | 786 #if defined(OS_CHROMEOS) |
| 787 tooltip_window_->SetTooltipText(UTF16ToWideHack(clamped_tooltip)); | 787 tooltip_window_->SetTooltipText(UTF16ToWideHack(clamped_tooltip)); |
| 788 #endif // defined(OS_CHROMEOS) | 788 #endif // defined(OS_CHROMEOS) |
| 789 } | 789 } |
| 790 } | 790 } |
| 791 | 791 |
| 792 void RenderWidgetHostViewGtk::SelectionChanged(const std::string& text) { | 792 void RenderWidgetHostViewGtk::SelectionChanged(const std::string& text, |
| 793 int start, |
| 794 int end) { |
| 793 if (!text.empty()) { | 795 if (!text.empty()) { |
| 794 GtkClipboard* x_clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); | 796 GtkClipboard* x_clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); |
| 795 gtk_clipboard_set_text(x_clipboard, text.c_str(), text.length()); | 797 gtk_clipboard_set_text(x_clipboard, text.c_str(), text.length()); |
| 796 } | 798 } |
| 797 } | 799 } |
| 798 | 800 |
| 799 void RenderWidgetHostViewGtk::ShowingContextMenu(bool showing) { | 801 void RenderWidgetHostViewGtk::ShowingContextMenu(bool showing) { |
| 800 is_showing_context_menu_ = showing; | 802 is_showing_context_menu_ = showing; |
| 801 } | 803 } |
| 802 | 804 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 } | 1134 } |
| 1133 | 1135 |
| 1134 // static | 1136 // static |
| 1135 RenderWidgetHostView* | 1137 RenderWidgetHostView* |
| 1136 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1138 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
| 1137 gfx::NativeView widget) { | 1139 gfx::NativeView widget) { |
| 1138 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 1140 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
| 1139 kRenderWidgetHostViewKey); | 1141 kRenderWidgetHostViewKey); |
| 1140 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 1142 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
| 1141 } | 1143 } |
| OLD | NEW |