| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_IMPORTER_LOCK_VIEW_H__ | 5 #ifndef CHROME_BROWSER_VIEWS_IMPORTER_LOCK_VIEW_H__ |
| 6 #define CHROME_BROWSER_VIEWS_IMPORTER_LOCK_VIEW_H__ | 6 #define CHROME_BROWSER_VIEWS_IMPORTER_LOCK_VIEW_H__ |
| 7 | 7 |
| 8 #include "chrome/views/dialog_delegate.h" | 8 #include "chrome/views/dialog_delegate.h" |
| 9 #include "chrome/views/view.h" | 9 #include "chrome/views/view.h" |
| 10 | 10 |
| 11 namespace ChromeViews { | 11 namespace ChromeViews { |
| 12 | 12 |
| 13 class Label; | 13 class Label; |
| 14 class Window; | 14 class Window; |
| 15 | 15 |
| 16 } | 16 } |
| 17 | 17 |
| 18 class ImporterHost; | 18 class ImporterHost; |
| 19 | 19 |
| 20 // ImporterLockView draws the dialog, and asks the user to shut Firefox | 20 // ImporterLockView draws the dialog, and asks the user to shut Firefox |
| 21 // down before starting the import. | 21 // down before starting the import. |
| 22 class ImporterLockView : public ChromeViews::View, | 22 class ImporterLockView : public ChromeViews::View, |
| 23 public ChromeViews::DialogDelegate { | 23 public ChromeViews::DialogDelegate { |
| 24 public: | 24 public: |
| 25 explicit ImporterLockView(ImporterHost* host); | 25 explicit ImporterLockView(ImporterHost* host); |
| 26 virtual ~ImporterLockView(); | 26 virtual ~ImporterLockView(); |
| 27 | 27 |
| 28 // Overridden from ChromeViews::View. | 28 // Overridden from ChromeViews::View. |
| 29 virtual void GetPreferredSize(CSize *out); | 29 virtual gfx::Size GetPreferredSize(); |
| 30 virtual void Layout(); | 30 virtual void Layout(); |
| 31 | 31 |
| 32 // Overridden from ChromeViews::DialogDelegate: | 32 // Overridden from ChromeViews::DialogDelegate: |
| 33 virtual std::wstring GetDialogButtonLabel(DialogButton button) const; | 33 virtual std::wstring GetDialogButtonLabel(DialogButton button) const; |
| 34 virtual bool IsModal() const; | 34 virtual bool IsModal() const; |
| 35 virtual std::wstring GetWindowTitle() const; | 35 virtual std::wstring GetWindowTitle() const; |
| 36 virtual bool Accept(); | 36 virtual bool Accept(); |
| 37 virtual bool Cancel(); | 37 virtual bool Cancel(); |
| 38 virtual ChromeViews::View* GetContentsView(); | 38 virtual ChromeViews::View* GetContentsView(); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 ChromeViews::Label* description_label_; | 41 ChromeViews::Label* description_label_; |
| 42 | 42 |
| 43 ImporterHost* importer_host_; | 43 ImporterHost* importer_host_; |
| 44 | 44 |
| 45 DISALLOW_EVIL_CONSTRUCTORS(ImporterLockView); | 45 DISALLOW_EVIL_CONSTRUCTORS(ImporterLockView); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 #endif // CHROME_BROWSER_VIEWS_IMPORTER_LOCK_VIEW_H__ | 48 #endif // CHROME_BROWSER_VIEWS_IMPORTER_LOCK_VIEW_H__ |
| 49 | 49 |
| OLD | NEW |