Index: ui/base/dragdrop/gtk_dnd_util.cc |
=================================================================== |
--- ui/base/dragdrop/gtk_dnd_util.cc (revision 116976) |
+++ ui/base/dragdrop/gtk_dnd_util.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -192,7 +192,7 @@ |
// _NETSCAPE_URL format is URL + \n + title. |
std::string utf8_text = url.spec() + "\n" + UTF16ToUTF8(title); |
gtk_selection_data_set(selection_data, |
- gtk_selection_data_get_target(selection_data), |
+ selection_data->target, |
kBitsPerByte, |
reinterpret_cast<const guchar*>(utf8_text.c_str()), |
utf8_text.length()); |
@@ -209,13 +209,11 @@ |
bool ExtractNamedURL(GtkSelectionData* selection_data, |
GURL* url, |
string16* title) { |
- if (!selection_data || gtk_selection_data_get_length(selection_data) <= 0) |
+ if (!selection_data || selection_data->length <= 0) |
return false; |
- Pickle data( |
- reinterpret_cast<const char*>( |
- gtk_selection_data_get_data(selection_data)), |
- gtk_selection_data_get_length(selection_data)); |
+ Pickle data(reinterpret_cast<char*>(selection_data->data), |
+ selection_data->length); |
void* iter = NULL; |
std::string title_utf8, url_utf8; |
if (!data.ReadString(&iter, &title_utf8) || |
@@ -250,15 +248,13 @@ |
bool ExtractNetscapeURL(GtkSelectionData* selection_data, |
GURL* url, |
string16* title) { |
- if (!selection_data || gtk_selection_data_get_length(selection_data) <= 0) |
+ if (!selection_data || selection_data->length <= 0) |
return false; |
// Find the first '\n' in the data. It is the separator between the url and |
// the title. |
- std::string data( |
- reinterpret_cast<const char*>( |
- gtk_selection_data_get_data(selection_data)), |
- gtk_selection_data_get_length(selection_data)); |
+ std::string data(reinterpret_cast<char*>(selection_data->data), |
+ selection_data->length); |
std::string::size_type newline = data.find('\n'); |
if (newline == std::string::npos) |
return false; |