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

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

Issue 208313009: Fix the HTML5 drag and drop demos on Linux and CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 #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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 if (!drop_data.download_metadata.empty()) 366 if (!drop_data.download_metadata.empty())
367 PrepareDragForDownload(drop_data, provider, web_contents); 367 PrepareDragForDownload(drop_data, provider, web_contents);
368 #endif 368 #endif
369 #if (!defined(OS_CHROMEOS) && defined(USE_X11)) || defined(OS_WIN) 369 #if (!defined(OS_CHROMEOS) && defined(USE_X11)) || defined(OS_WIN)
370 // We set the file contents before the URL because the URL also sets file 370 // We set the file contents before the URL because the URL also sets file
371 // contents (to a .URL shortcut). We want to prefer file content data over 371 // contents (to a .URL shortcut). We want to prefer file content data over
372 // a shortcut so we add it first. 372 // a shortcut so we add it first.
373 if (!drop_data.file_contents.empty()) 373 if (!drop_data.file_contents.empty())
374 PrepareDragForFileContents(drop_data, provider); 374 PrepareDragForFileContents(drop_data, provider);
375 #endif 375 #endif
376 // We set the string before the URL because the URL also sets the string. We
377 // want to prefer a custom string over the URL string so we add it first.
Peter Kasting 2014/06/20 20:45:36 This comment lies. With your changes, SetURL() _d
376 if (!drop_data.text.string().empty()) 378 if (!drop_data.text.string().empty())
377 provider->SetString(drop_data.text.string()); 379 provider->SetString(drop_data.text.string());
378 if (drop_data.url.is_valid()) 380 if (drop_data.url.is_valid())
379 provider->SetURL(drop_data.url, drop_data.url_title); 381 provider->SetURL(drop_data.url, drop_data.url_title);
380 if (!drop_data.html.string().empty()) 382 if (!drop_data.html.string().empty())
381 provider->SetHtml(drop_data.html.string(), drop_data.html_base_url); 383 provider->SetHtml(drop_data.html.string(), drop_data.html_base_url);
382 if (!drop_data.filenames.empty()) 384 if (!drop_data.filenames.empty())
383 provider->SetFilenames(drop_data.filenames); 385 provider->SetFilenames(drop_data.filenames);
384 if (!drop_data.file_system_files.empty()) { 386 if (!drop_data.file_system_files.empty()) {
385 Pickle pickle; 387 Pickle pickle;
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, 1571 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window,
1570 bool visible) { 1572 bool visible) {
1571 // Ignore any visibility changes in the hierarchy below. 1573 // Ignore any visibility changes in the hierarchy below.
1572 if (window != window_.get() && window_->Contains(window)) 1574 if (window != window_.get() && window_->Contains(window))
1573 return; 1575 return;
1574 1576
1575 UpdateWebContentsVisibility(web_contents_, visible); 1577 UpdateWebContentsVisibility(web_contents_, visible);
1576 } 1578 }
1577 1579
1578 } // namespace content 1580 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698