blob: 4846fd931f66a24753cf8c937e98d40a9a97e456 [file] [log] [blame]
// Copyright (c) 2012 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 CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "ui/views/view.h"
#include "ui/views/window/dialog_delegate.h"
namespace views {
class Label;
}
// ImportLockDialogView asks the user to shut down Firefox before starting the
// profile import.
class ImportLockDialogView : public views::DialogDelegateView {
public:
static void Show(gfx::NativeWindow parent,
const base::Callback<void(bool)>& callback);
private:
explicit ImportLockDialogView(const base::Callback<void(bool)>& callback);
virtual ~ImportLockDialogView();
// views::View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void Layout() OVERRIDE;
// views::DialogDelegate:
virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
virtual string16 GetWindowTitle() const OVERRIDE;
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
private:
views::Label* description_label_;
// Called with the result of the dialog.
base::Callback<void(bool)> callback_;
DISALLOW_COPY_AND_ASSIGN(ImportLockDialogView);
};
#endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_