| Index: chrome/browser/ui/views/extensions/request_file_system_dialog_view.h
|
| diff --git a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h b/chrome/browser/ui/views/extensions/request_file_system_dialog_view.h
|
| similarity index 66%
|
| rename from chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h
|
| rename to chrome/browser/ui/views/extensions/request_file_system_dialog_view.h
|
| index f113f0b72d8172effc2b80e427ff3ef25ad78d1c..5c3de0e99444c531313207e456f8cd9fbbb667e9 100644
|
| --- a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h
|
| +++ b/chrome/browser/ui/views/extensions/request_file_system_dialog_view.h
|
| @@ -2,15 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_VIEW_H_
|
| -#define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_VIEW_H_
|
| +#ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_REQUEST_FILE_SYSTEM_DIALOG_VIEW_H_
|
| +#define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_REQUEST_FILE_SYSTEM_DIALOG_VIEW_H_
|
|
|
| #include "base/callback_forward.h"
|
| #include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/strings/string16.h"
|
| -#include "chrome/browser/chromeos/file_manager/volume_manager.h"
|
| -#include "extensions/common/extension.h"
|
| #include "ui/base/ui_base_types.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
|
|
| @@ -18,24 +16,20 @@ namespace content {
|
| class WebContents;
|
| } // namespace content
|
|
|
| -namespace file_manager {
|
| -class Volume;
|
| -} // namespace file_manager
|
| -
|
| namespace views {
|
| class View;
|
| } // namespace views
|
|
|
| // Represents a dialog shown to a user for granting access to a file system.
|
| -class RequestFileSystemDialogView : public views::DialogDelegate {
|
| +class RequestFileSystemDialogView : public views::DialogDelegateView {
|
| public:
|
| ~RequestFileSystemDialogView() override;
|
|
|
| // Shows the dialog and calls |callback| on completion.
|
| static void ShowDialog(
|
| content::WebContents* web_contents,
|
| - const extensions::Extension& extension,
|
| - base::WeakPtr<file_manager::Volume> volume,
|
| + const std::string& extension_name,
|
| + const std::string& volume_label,
|
| bool writable,
|
| const base::Callback<void(ui::DialogButton)>& callback);
|
|
|
| @@ -44,16 +38,15 @@ class RequestFileSystemDialogView : public views::DialogDelegate {
|
| int GetDefaultDialogButton() const override;
|
| base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
|
| ui::ModalType GetModalType() const override;
|
| - views::View* GetContentsView() override;
|
| - views::Widget* GetWidget() override;
|
| - const views::Widget* GetWidget() const override;
|
| bool Cancel() override;
|
| bool Accept() override;
|
| + gfx::Size GetPreferredSize() const override;
|
| + gfx::Insets GetInsets() const override;
|
|
|
| private:
|
| RequestFileSystemDialogView(
|
| - const extensions::Extension& extension,
|
| - base::WeakPtr<file_manager::Volume> volume,
|
| + const std::string& extension_name,
|
| + const std::string& volume_label,
|
| bool writable,
|
| const base::Callback<void(ui::DialogButton)>& callback);
|
|
|
| @@ -63,4 +56,4 @@ class RequestFileSystemDialogView : public views::DialogDelegate {
|
| DISALLOW_COPY_AND_ASSIGN(RequestFileSystemDialogView);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_VIEW_H_
|
| +#endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_REQUEST_FILE_SYSTEM_DIALOG_VIEW_H_
|
|
|