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

Side by Side Diff: content/browser/web_contents/web_drag_source_mac.mm

Issue 18346006: Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 #import "content/browser/web_contents/web_drag_source_mac.h" 5 #import "content/browser/web_contents/web_drag_source_mac.h"
6 6
7 #include <sys/param.h> 7 #include <sys/param.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (downloadURL_.is_valid()) { 381 if (downloadURL_.is_valid()) {
382 scoped_refptr<DragDownloadFile> dragFileDownloader(new DragDownloadFile( 382 scoped_refptr<DragDownloadFile> dragFileDownloader(new DragDownloadFile(
383 filePath, 383 filePath,
384 fileStream.Pass(), 384 fileStream.Pass(),
385 downloadURL_, 385 downloadURL_,
386 content::Referrer(contents_->GetURL(), dropData_->referrer_policy), 386 content::Referrer(contents_->GetURL(), dropData_->referrer_policy),
387 contents_->GetEncoding(), 387 contents_->GetEncoding(),
388 contents_)); 388 contents_));
389 389
390 // The finalizer will take care of closing and deletion. 390 // The finalizer will take care of closing and deletion.
391 dragFileDownloader->Start(new PromiseFileFinalizer(dragFileDownloader)); 391 dragFileDownloader->Start(new PromiseFileFinalizer(
392 dragFileDownloader.get()));
392 } else { 393 } else {
393 // The writer will take care of closing and deletion. 394 // The writer will take care of closing and deletion.
394 BrowserThread::PostTask(BrowserThread::FILE, 395 BrowserThread::PostTask(BrowserThread::FILE,
395 FROM_HERE, 396 FROM_HERE,
396 base::Bind(&PromiseWriterHelper, 397 base::Bind(&PromiseWriterHelper,
397 *dropData_, 398 *dropData_,
398 base::Passed(&fileStream))); 399 base::Passed(&fileStream)));
399 } 400 }
400 } 401 }
401 402
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 - (NSImage*)dragImage { 501 - (NSImage*)dragImage {
501 if (dragImage_) 502 if (dragImage_)
502 return dragImage_; 503 return dragImage_;
503 504
504 // Default to returning a generic image. 505 // Default to returning a generic image.
505 return content::GetContentClient()->GetNativeImageNamed( 506 return content::GetContentClient()->GetNativeImageNamed(
506 IDR_DEFAULT_FAVICON).ToNSImage(); 507 IDR_DEFAULT_FAVICON).ToNSImage();
507 } 508 }
508 509
509 @end // @implementation WebDragSource (Private) 510 @end // @implementation WebDragSource (Private)
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/child/indexed_db/indexed_db_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698