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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 2322253004: Drag and dropping text, parsable as url (Closed)
Patch Set: initial patch for windows Created 4 years, 3 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 // 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 #include "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { 321 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) {
322 drop_data->did_originate_from_renderer = data.DidOriginateFromRenderer(); 322 drop_data->did_originate_from_renderer = data.DidOriginateFromRenderer();
323 323
324 base::string16 plain_text; 324 base::string16 plain_text;
325 data.GetString(&plain_text); 325 data.GetString(&plain_text);
326 if (!plain_text.empty()) 326 if (!plain_text.empty())
327 drop_data->text = base::NullableString16(plain_text, false); 327 drop_data->text = base::NullableString16(plain_text, false);
328 328
329 GURL url; 329 GURL url;
330 base::string16 url_title; 330 base::string16 url_title;
331 data.GetURLAndTitle( 331 data.GetURLAndTitle(ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES,
332 ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES, &url, &url_title); 332 ui::OSExchangeData::PARSE_TEXT_AS_URL, &url, &url_title);
333 if (url.is_valid()) { 333 if (url.is_valid()) {
334 drop_data->url = url; 334 drop_data->url = url;
335 drop_data->url_title = url_title; 335 drop_data->url_title = url_title;
336 } 336 }
337 337
338 base::string16 html; 338 base::string16 html;
339 GURL html_base_url; 339 GURL html_base_url;
340 data.GetHtml(&html, &html_base_url); 340 data.GetHtml(&html, &html_base_url);
341 if (!html.empty()) 341 if (!html.empty())
342 drop_data->html = base::NullableString16(html, false); 342 drop_data->html = base::NullableString16(html, false);
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 bool allow_multiple_selection) { 1212 bool allow_multiple_selection) {
1213 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; 1213 NOTIMPLEMENTED() << " show " << items.size() << " menu items";
1214 } 1214 }
1215 1215
1216 void WebContentsViewAura::HidePopupMenu() { 1216 void WebContentsViewAura::HidePopupMenu() {
1217 NOTIMPLEMENTED(); 1217 NOTIMPLEMENTED();
1218 } 1218 }
1219 #endif 1219 #endif
1220 1220
1221 } // namespace content 1221 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698