OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_gtk.h" | 5 #include "content/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 "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 } | 958 } |
959 | 959 |
960 std::string utf8_selection = UTF16ToUTF8(text.substr(pos, n)); | 960 std::string utf8_selection = UTF16ToUTF8(text.substr(pos, n)); |
961 GtkClipboard* x_clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); | 961 GtkClipboard* x_clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); |
962 gtk_clipboard_set_text( | 962 gtk_clipboard_set_text( |
963 x_clipboard, utf8_selection.c_str(), utf8_selection.length()); | 963 x_clipboard, utf8_selection.c_str(), utf8_selection.length()); |
964 } | 964 } |
965 | 965 |
966 void RenderWidgetHostViewGtk::SelectionBoundsChanged( | 966 void RenderWidgetHostViewGtk::SelectionBoundsChanged( |
967 const gfx::Rect& start_rect, | 967 const gfx::Rect& start_rect, |
968 const gfx::Rect& end_rect) { | 968 WebKit::WebTextDirection start_direction, |
| 969 const gfx::Rect& end_rect, |
| 970 WebKit::WebTextDirection end_direction) { |
969 im_context_->UpdateCaretBounds(start_rect.Union(end_rect)); | 971 im_context_->UpdateCaretBounds(start_rect.Union(end_rect)); |
970 } | 972 } |
971 | 973 |
972 GdkEventButton* RenderWidgetHostViewGtk::GetLastMouseDown() { | 974 GdkEventButton* RenderWidgetHostViewGtk::GetLastMouseDown() { |
973 return last_mouse_down_; | 975 return last_mouse_down_; |
974 } | 976 } |
975 | 977 |
976 gfx::NativeView RenderWidgetHostViewGtk::BuildInputMethodsGtkMenu() { | 978 gfx::NativeView RenderWidgetHostViewGtk::BuildInputMethodsGtkMenu() { |
977 return im_context_->BuildInputMethodsGtkMenu(); | 979 return im_context_->BuildInputMethodsGtkMenu(); |
978 } | 980 } |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1547 this)); | 1549 this)); |
1548 } | 1550 } |
1549 BrowserAccessibilityGtk* root = | 1551 BrowserAccessibilityGtk* root = |
1550 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); | 1552 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); |
1551 | 1553 |
1552 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); | 1554 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); |
1553 return root->GetAtkObject(); | 1555 return root->GetAtkObject(); |
1554 } | 1556 } |
1555 | 1557 |
1556 } // namespace content | 1558 } // namespace content |
OLD | NEW |