| OLD | NEW |
| 1 // Copyright (c) 2012 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 "content/browser/tab_contents/web_drag_source_gtk.h" | 5 #include "content/browser/tab_contents/web_drag_source_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/nix/mime_util_xdg.h" | 10 #include "base/nix/mime_util_xdg.h" |
| 11 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 new drag_download_util::PromiseFileFinalizer( | 257 new drag_download_util::PromiseFileFinalizer( |
| 258 drag_file_downloader)); | 258 drag_file_downloader)); |
| 259 | 259 |
| 260 // Set the status code to success. | 260 // Set the status code to success. |
| 261 status_code = 'S'; | 261 status_code = 'S'; |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 // Return the status code to the file manager. | 265 // Return the status code to the file manager. |
| 266 gtk_selection_data_set(selection_data, | 266 gtk_selection_data_set(selection_data, |
| 267 gtk_selection_data_get_target(selection_data), | 267 selection_data->target, |
| 268 kBitsPerByte, | 268 kBitsPerByte, |
| 269 reinterpret_cast<guchar*>(&status_code), | 269 reinterpret_cast<guchar*>(&status_code), |
| 270 1); | 270 1); |
| 271 } | 271 } |
| 272 break; | 272 break; |
| 273 } | 273 } |
| 274 | 274 |
| 275 case ui::CUSTOM_DATA: { | 275 case ui::CUSTOM_DATA: { |
| 276 Pickle custom_data; | 276 Pickle custom_data; |
| 277 ui::WriteCustomDataToPickle(drop_data_->custom_data, &custom_data); | 277 ui::WriteCustomDataToPickle(drop_data_->custom_data, &custom_data); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 cairo_clip(cr); | 393 cairo_clip(cr); |
| 394 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); | 394 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
| 395 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); | 395 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); |
| 396 cairo_paint(cr); | 396 cairo_paint(cr); |
| 397 cairo_destroy(cr); | 397 cairo_destroy(cr); |
| 398 | 398 |
| 399 return TRUE; | 399 return TRUE; |
| 400 } | 400 } |
| 401 | 401 |
| 402 } // namespace content | 402 } // namespace content |
| OLD | NEW |