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

Side by Side Diff: third_party/WebKit/Source/core/page/DragData.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. 3 * Copyright (C) 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 bool DragData::containsCompatibleContent() const 111 bool DragData::containsCompatibleContent() const
112 { 112 {
113 return containsPlainText() 113 return containsPlainText()
114 || containsURL() 114 || containsURL()
115 || containsHTML(m_platformDragData) 115 || containsHTML(m_platformDragData)
116 || containsFiles(); 116 || containsFiles();
117 } 117 }
118 118
119 PassRefPtrWillBeRawPtr<DocumentFragment> DragData::asFragment(LocalFrame* frame) const 119 RawPtr<DocumentFragment> DragData::asFragment(LocalFrame* frame) const
120 { 120 {
121 /* 121 /*
122 * Order is richest format first. On OSX this is: 122 * Order is richest format first. On OSX this is:
123 * * Web Archive 123 * * Web Archive
124 * * Filenames 124 * * Filenames
125 * * HTML 125 * * HTML
126 * * RTF 126 * * RTF
127 * * TIFF 127 * * TIFF
128 * * PICT 128 * * PICT
129 */ 129 */
130 130
131 if (containsFiles()) { 131 if (containsFiles()) {
132 // FIXME: Implement this. Should be pretty simple to make some HTML 132 // FIXME: Implement this. Should be pretty simple to make some HTML
133 // and call createFragmentFromMarkup. 133 // and call createFragmentFromMarkup.
134 } 134 }
135 135
136 if (m_platformDragData->types().contains(mimeTypeTextHTML)) { 136 if (m_platformDragData->types().contains(mimeTypeTextHTML)) {
137 String html; 137 String html;
138 KURL baseURL; 138 KURL baseURL;
139 m_platformDragData->htmlAndBaseURL(html, baseURL); 139 m_platformDragData->htmlAndBaseURL(html, baseURL);
140 ASSERT(frame->document()); 140 ASSERT(frame->document());
141 if (RefPtrWillBeRawPtr<DocumentFragment> fragment = createFragmentFromMa rkup(*frame->document(), html, baseURL, DisallowScriptingAndPluginContent)) 141 if (RawPtr<DocumentFragment> fragment = createFragmentFromMarkup(*frame- >document(), html, baseURL, DisallowScriptingAndPluginContent))
142 return fragment.release(); 142 return fragment.release();
143 } 143 }
144 144
145 return nullptr; 145 return nullptr;
146 } 146 }
147 147
148 String DragData::droppedFileSystemId() const 148 String DragData::droppedFileSystemId() const
149 { 149 {
150 return m_platformDragData->filesystemId(); 150 return m_platformDragData->filesystemId();
151 } 151 }
152 152
153 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/DragData.h ('k') | third_party/WebKit/Source/core/page/DragState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698