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

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

Issue 8487001: Remove 13 exit time constructors and 3 static initializers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 1 month 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
« no previous file with comments | « no previous file | jingle/notifier/listener/push_notifications_subscribe_task.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "content/browser/tab_contents/web_drag_source_mac.h" 5 #import "content/browser/tab_contents/web_drag_source_mac.h"
6 6
7 #include <sys/param.h> 7 #include <sys/param.h>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return self; 154 return self;
155 } 155 }
156 156
157 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { 157 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal {
158 return dragOperationMask_; 158 return dragOperationMask_;
159 } 159 }
160 160
161 - (void)lazyWriteToPasteboard:(NSPasteboard*)pboard forType:(NSString*)type { 161 - (void)lazyWriteToPasteboard:(NSPasteboard*)pboard forType:(NSString*)type {
162 // NSHTMLPboardType requires the character set to be declared. Otherwise, it 162 // NSHTMLPboardType requires the character set to be declared. Otherwise, it
163 // assumes US-ASCII. Awesome. 163 // assumes US-ASCII. Awesome.
164 static const string16 kHtmlHeader = 164 const string16 kHtmlHeader = ASCIIToUTF16(
165 ASCIIToUTF16("<meta http-equiv=\"Content-Type\" " 165 "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">");
166 "content=\"text/html;charset=UTF-8\">");
167 166
168 // Be extra paranoid; avoid crashing. 167 // Be extra paranoid; avoid crashing.
169 if (!dropData_.get()) { 168 if (!dropData_.get()) {
170 NOTREACHED() << "No drag-and-drop data available for lazy write."; 169 NOTREACHED() << "No drag-and-drop data available for lazy write.";
171 return; 170 return;
172 } 171 }
173 172
174 // HTML. 173 // HTML.
175 if ([type isEqualToString:NSHTMLPboardType]) { 174 if ([type isEqualToString:NSHTMLPboardType]) {
176 DCHECK(!dropData_->text_html.empty()); 175 DCHECK(!dropData_->text_html.empty());
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 446
448 - (NSImage*)dragImage { 447 - (NSImage*)dragImage {
449 if (dragImage_) 448 if (dragImage_)
450 return dragImage_; 449 return dragImage_;
451 450
452 // Default to returning a generic image. 451 // Default to returning a generic image.
453 return gfx::GetCachedImageWithName(@"nav.pdf"); 452 return gfx::GetCachedImageWithName(@"nav.pdf");
454 } 453 }
455 454
456 @end // @implementation WebDragSource (Private) 455 @end // @implementation WebDragSource (Private)
OLDNEW
« no previous file with comments | « no previous file | jingle/notifier/listener/push_notifications_subscribe_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698