Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / importer / import_lock_dialog_view.h
blob8324e0c9401131f916fbed92e4b90f8c125857da
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "ui/views/view.h"
13 #include "ui/views/window/dialog_delegate.h"
15 namespace views {
16 class Label;
19 // ImportLockDialogView asks the user to shut down Firefox before starting the
20 // profile import.
21 class ImportLockDialogView : public views::DialogDelegateView {
22 public:
23 static void Show(gfx::NativeWindow parent,
24 const base::Callback<void(bool)>& callback);
26 private:
27 explicit ImportLockDialogView(const base::Callback<void(bool)>& callback);
28 ~ImportLockDialogView() override;
30 // views::View:
31 gfx::Size GetPreferredSize() const override;
32 void Layout() override;
34 // views::DialogDelegate:
35 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
36 base::string16 GetWindowTitle() const override;
37 bool Accept() override;
38 bool Cancel() override;
40 private:
41 views::Label* description_label_;
43 // Called with the result of the dialog.
44 base::Callback<void(bool)> callback_;
46 DISALLOW_COPY_AND_ASSIGN(ImportLockDialogView);
49 #endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_