forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the first step towards enabling drag and drop in Ozone/X11 using the components extracted in previous patches. Here the core part of the functionality is enabled. As Ozone allows selecting the platform at run time, it is necessary for it to select the proper OS exchange data provider at run time too. In this CL the new platform method is introduced that creates the provider, so the provider factory now asks the platform to instantiate a new provider. The XDragDropClient is modified so it can now be aggregated; it is used by the X11Window to handle the XDND events. Subsequent CLs will add rich drag and drop features such as drag image, mouse pointer shapes reflecting the current operation, etc. Bug: 1014860 Change-Id: I1a32f880fb9ac4fe8748507142d227c6cbafddbd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033149 Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Darwin Huang <huangdarwin@chromium.org> Commit-Queue: Alexander Dunaev <adunaev@igalia.com> Cr-Commit-Position: refs/heads/master@{#762232}
- Loading branch information
1 parent
ae97855
commit 13e6e25
Showing
63 changed files
with
957 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include_rules = [ | ||
"+ui/ozone/public/ozone_platform.h", | ||
"+third_party/mozilla", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "ui/base/dragdrop/download_file_info.h" | ||
|
||
#include <utility> | ||
|
||
namespace ui { | ||
|
||
DownloadFileInfo::DownloadFileInfo( | ||
const base::FilePath& filename, | ||
std::unique_ptr<DownloadFileProvider> downloader) | ||
: filename(filename), downloader(std::move(downloader)) {} | ||
|
||
DownloadFileInfo::~DownloadFileInfo() = default; | ||
|
||
} // namespace ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef UI_BASE_DRAGDROP_DOWNLOAD_FILE_INFO_H_ | ||
#define UI_BASE_DRAGDROP_DOWNLOAD_FILE_INFO_H_ | ||
|
||
#include <memory> | ||
|
||
#include "base/component_export.h" | ||
#include "base/files/file_path.h" | ||
#include "ui/base/dragdrop/download_file_interface.h" | ||
|
||
namespace ui { | ||
|
||
// Encapsulates the info about a file to be downloaded. | ||
struct COMPONENT_EXPORT(UI_BASE_DATA_EXCHANGE) DownloadFileInfo { | ||
DownloadFileInfo(const base::FilePath& filename, | ||
std::unique_ptr<DownloadFileProvider> downloader); | ||
~DownloadFileInfo(); | ||
|
||
base::FilePath filename; | ||
std::unique_ptr<DownloadFileProvider> downloader; | ||
}; | ||
|
||
} // namespace ui | ||
|
||
#endif // UI_BASE_DRAGDROP_DOWNLOAD_FILE_INFO_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.