mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1881329 - Revert addition of nsIFilePicker::Close() r=emilio
This function can't be implemented for Win32 (yet?), partly due to internal architectural issues. (See bug 1870660 for more details.) Remove the existing stubs (and perfectly-functional Gtk implementation) as dead code until such time as they can be made live. (This commit also reverts a fix to this code from bug 1872834, which should be restored if and when the rest of it is.) Differential Revision: https://phabricator.services.mozilla.com/D214317
This commit is contained in:
parent
630b99ecf1
commit
1042634d37
@ -277,13 +277,6 @@ mozilla::ipc::IPCResult FilePickerParent::RecvOpen(
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult FilePickerParent::RecvClose() {
|
||||
if (mFilePicker) {
|
||||
mFilePicker->Close();
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void FilePickerParent::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
if (mCallback) {
|
||||
mCallback->Destroy();
|
||||
|
@ -53,8 +53,6 @@ class FilePickerParent : public PFilePickerParent {
|
||||
const nsString& aDisplaySpecialDirectory, const nsString& aOkButtonLabel,
|
||||
const nsIFilePicker::CaptureTarget& aCapture);
|
||||
|
||||
mozilla::ipc::IPCResult RecvClose();
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
class FilePickerShownCallback : public nsIFilePickerShownCallback {
|
||||
|
@ -38,8 +38,6 @@ parent:
|
||||
nsString displaySpecialDirectory, nsString okButtonLabel,
|
||||
CaptureTarget capture);
|
||||
|
||||
async Close();
|
||||
|
||||
child:
|
||||
async __delete__(MaybeInputData data, ResultCode result);
|
||||
};
|
||||
|
@ -574,16 +574,6 @@ nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFilePicker::Close() {
|
||||
if (mFileChooser) {
|
||||
// Call ourself as done.
|
||||
Done(mFileChooser, GTK_RESPONSE_CLOSE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void nsFilePicker::OnResponse(void* file_chooser, gint response_id,
|
||||
gpointer user_data) {
|
||||
|
@ -24,7 +24,6 @@ class nsFilePicker : public nsBaseFilePicker {
|
||||
|
||||
// nsIFilePicker (less what's in nsBaseFilePicker)
|
||||
NS_IMETHOD Open(nsIFilePickerShownCallback* aCallback) override;
|
||||
NS_IMETHOD Close() override;
|
||||
NS_IMETHOD IsModeSupported(nsIFilePicker::Mode, JSContext*,
|
||||
mozilla::dom::Promise**) override;
|
||||
NS_IMETHOD AppendFilters(int32_t aFilterMask) override;
|
||||
|
@ -212,12 +212,6 @@ nsBaseFilePicker::Open(nsIFilePickerShownCallback* aCallback) {
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBaseFilePicker::Close() {
|
||||
NS_WARNING("Unimplemented nsFilePicker::Close");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBaseFilePicker::AppendFilters(int32_t aFilterMask) {
|
||||
nsCOMPtr<nsIStringBundleService> stringService =
|
||||
|
@ -35,7 +35,6 @@ class nsBaseFilePicker : public nsIFilePicker {
|
||||
#ifndef XP_WIN
|
||||
NS_IMETHOD Open(nsIFilePickerShownCallback* aCallback) override;
|
||||
#endif
|
||||
NS_IMETHOD Close() override;
|
||||
NS_IMETHOD AppendFilters(int32_t filterMask) override;
|
||||
NS_IMETHOD AppendRawFilter(const nsAString& aFilter) override;
|
||||
NS_IMETHOD GetCapture(nsIFilePicker::CaptureTarget* aCapture) override;
|
||||
|
@ -146,13 +146,6 @@ nsFilePickerProxy::Open(nsIFilePickerShownCallback* aCallback) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFilePickerProxy::Close() {
|
||||
SendClose();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult nsFilePickerProxy::Recv__delete__(
|
||||
const MaybeInputData& aData, const nsIFilePicker::ResultCode& aResult) {
|
||||
auto* inner = mBrowsingContext->GetDOMWindow()
|
||||
|
@ -55,7 +55,6 @@ class nsFilePickerProxy : public nsBaseFilePicker,
|
||||
nsISimpleEnumerator** aValue) override;
|
||||
|
||||
NS_IMETHOD Open(nsIFilePickerShownCallback* aCallback) override;
|
||||
NS_IMETHOD Close() override;
|
||||
|
||||
// PFilePickerChild
|
||||
virtual mozilla::ipc::IPCResult Recv__delete__(
|
||||
|
@ -210,11 +210,6 @@ interface nsIFilePicker : nsISupports
|
||||
*/
|
||||
void open(in nsIFilePickerShownCallback aFilePickerShownCallback);
|
||||
|
||||
/**
|
||||
* Closes the file dialog if open.
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* The picker's mode, as set by the 'mode' argument passed to init()
|
||||
* (one of the modeOpen et. al. constants specified above).
|
||||
|
Loading…
Reference in New Issue
Block a user