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

Side by Side Diff: content/browser/tab_contents/web_drag_source_gtk.cc

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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) 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 "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"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Open the file as a stream. 242 // Open the file as a stream.
243 net::FileStream* file_stream = 243 net::FileStream* file_stream =
244 drag_download_util::CreateFileStreamForDrop(&file_path); 244 drag_download_util::CreateFileStreamForDrop(&file_path);
245 if (file_stream) { 245 if (file_stream) {
246 // Start downloading the file to the stream. 246 // Start downloading the file to the stream.
247 scoped_refptr<DragDownloadFile> drag_file_downloader = 247 scoped_refptr<DragDownloadFile> drag_file_downloader =
248 new DragDownloadFile(file_path, 248 new DragDownloadFile(file_path,
249 linked_ptr<net::FileStream>(file_stream), 249 linked_ptr<net::FileStream>(file_stream),
250 download_url_, 250 download_url_,
251 tab_contents_->GetURL(), 251 tab_contents_->GetURL(),
252 tab_contents_->encoding(), 252 tab_contents_->GetEncoding(),
253 tab_contents_); 253 tab_contents_);
254 drag_file_downloader->Start( 254 drag_file_downloader->Start(
255 new drag_download_util::PromiseFileFinalizer( 255 new drag_download_util::PromiseFileFinalizer(
256 drag_file_downloader)); 256 drag_file_downloader));
257 257
258 // Set the status code to success. 258 // Set the status code to success.
259 status_code = 'S'; 259 status_code = 'S';
260 } 260 }
261 } 261 }
262 262
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 cairo_clip(cr); 391 cairo_clip(cr);
392 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); 392 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
393 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); 393 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0);
394 cairo_paint(cr); 394 cairo_paint(cr);
395 cairo_destroy(cr); 395 cairo_destroy(cr);
396 396
397 return TRUE; 397 return TRUE;
398 } 398 }
399 399
400 } // namespace content 400 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents_unittest.cc ('k') | content/browser/tab_contents/web_drag_source_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698