Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: chrome/browser/ui/views/importer/import_lock_dialog_view.h

Issue 2769383002: Firefox overlay is seen opened even if Import Overlay is Cancelled.
Patch Set: Fixed the Review Comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 #include "ui/views/window/dialog_delegate.h" 13 #include "ui/views/window/dialog_delegate.h"
14 14
15 namespace views { 15 namespace views {
16 class Label; 16 class Label;
17 } 17 }
18 18
19 // ImportLockDialogView asks the user to shut down Firefox before starting the 19 // ImportLockDialogView asks the user to shut down Firefox before starting the
20 // profile import. 20 // profile import.
21 class ImportLockDialogView : public views::DialogDelegateView { 21 class ImportLockDialogView : public views::DialogDelegateView {
22 public: 22 public:
23 static void Show(gfx::NativeWindow parent, 23 static void Show(gfx::NativeWindow parent,
24 const base::Callback<void(bool)>& callback); 24 const base::Callback<void(bool)>& callback);
25 static void Hide();
25 26
26 private: 27 private:
27 explicit ImportLockDialogView(const base::Callback<void(bool)>& callback); 28 explicit ImportLockDialogView(const base::Callback<void(bool)>& callback);
28 ~ImportLockDialogView() override; 29 ~ImportLockDialogView() override;
29 30
30 // views::View: 31 // views::View:
31 gfx::Size GetPreferredSize() const override; 32 gfx::Size GetPreferredSize() const override;
32 void Layout() override; 33 void Layout() override;
33 34
34 // views::DialogDelegate: 35 // views::DialogDelegate:
35 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 36 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
36 base::string16 GetWindowTitle() const override; 37 base::string16 GetWindowTitle() const override;
37 bool Accept() override; 38 bool Accept() override;
38 bool Cancel() override; 39 bool Cancel() override;
39 40
40 private: 41 private:
41 views::Label* description_label_; 42 views::Label* description_label_;
42 43 static views::Widget* m_widget;
Ilya Sherman 2017/03/27 15:21:52 nit: Please move this to the implementation file,
nikhil.sahni 2017/03/28 11:22:00 Done.
43 // Called with the result of the dialog. 44 // Called with the result of the dialog.
44 base::Callback<void(bool)> callback_; 45 base::Callback<void(bool)> callback_;
45 46
46 DISALLOW_COPY_AND_ASSIGN(ImportLockDialogView); 47 DISALLOW_COPY_AND_ASSIGN(ImportLockDialogView);
47 }; 48 };
48 49
49 #endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_ 50 #endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_LOCK_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698