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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #include <gdk/gdkkeysyms.h> 9 #include <gdk/gdkkeysyms.h>
10 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 if (clamped_tooltip.empty()) { 943 if (clamped_tooltip.empty()) {
944 gtk_widget_set_has_tooltip(view_.get(), FALSE); 944 gtk_widget_set_has_tooltip(view_.get(), FALSE);
945 } else { 945 } else {
946 gtk_widget_set_tooltip_text(view_.get(), 946 gtk_widget_set_tooltip_text(view_.get(),
947 UTF16ToUTF8(clamped_tooltip).c_str()); 947 UTF16ToUTF8(clamped_tooltip).c_str());
948 } 948 }
949 } 949 }
950 950
951 void RenderWidgetHostViewGtk::SelectionChanged(const string16& text, 951 void RenderWidgetHostViewGtk::SelectionChanged(const string16& text,
952 size_t offset, 952 size_t offset,
953 const ui::Range& range) { 953 const gfx::Range& range) {
954 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); 954 RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
955 955
956 if (text.empty() || range.is_empty()) 956 if (text.empty() || range.is_empty())
957 return; 957 return;
958 size_t pos = range.GetMin() - offset; 958 size_t pos = range.GetMin() - offset;
959 size_t n = range.length(); 959 size_t n = range.length();
960 960
961 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; 961 DCHECK(pos + n <= text.length()) << "The text can not fully cover range.";
962 if (pos >= text.length()) { 962 if (pos >= text.length()) {
963 NOTREACHED() << "The text can not cover range."; 963 NOTREACHED() << "The text can not cover range.";
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 gfx::PluginWindowHandle id) { 1577 gfx::PluginWindowHandle id) {
1578 plugin_container_manager_.CreatePluginContainer(id); 1578 plugin_container_manager_.CreatePluginContainer(id);
1579 } 1579 }
1580 1580
1581 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( 1581 void RenderWidgetHostViewGtk::OnDestroyPluginContainer(
1582 gfx::PluginWindowHandle id) { 1582 gfx::PluginWindowHandle id) {
1583 plugin_container_manager_.DestroyPluginContainer(id); 1583 plugin_container_manager_.DestroyPluginContainer(id);
1584 } 1584 }
1585 1585
1586 } // namespace content 1586 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698