| OLD | NEW |
| 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_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_WIN_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/web_dialogs/web_dialog_ui.h" | 9 #include "ui/web_dialogs/web_dialog_ui.h" |
| 10 | 10 |
| 11 class Browser; | 11 class Browser; |
| 12 class Profile; | 12 class Profile; |
| 13 | 13 |
| 14 namespace views { |
| 15 class Widget; |
| 16 } |
| 17 |
| 14 // The UI used in first-run flow to prompt the user to set Chrome as the | 18 // The UI used in first-run flow to prompt the user to set Chrome as the |
| 15 // default Windows browser and *the browser* of Metro mode. Intended for | 19 // default Windows browser and *the browser* of Metro mode. Intended for |
| 16 // Windows 8 only. | 20 // Windows 8 only. |
| 17 class SetAsDefaultBrowserUI : public ui::WebDialogUI { | 21 class SetAsDefaultBrowserUI : public ui::WebDialogUI { |
| 18 public: | 22 public: |
| 19 explicit SetAsDefaultBrowserUI(content::WebUI* web_ui); | 23 explicit SetAsDefaultBrowserUI(content::WebUI* web_ui); |
| 20 | 24 |
| 21 // Present metroizer UI either in a new singleton tab or in a dialog window. | 25 // Present metroizer UI either in a new singleton tab or in a dialog window. |
| 22 static void Show(Profile* profile, Browser* browser); | 26 static void Show(Profile* profile); |
| 27 |
| 28 // Returns the web dialog widget for testing. |
| 29 static views::Widget* GetDialogWidgetForTesting(); |
| 23 | 30 |
| 24 private: | 31 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(SetAsDefaultBrowserUI); | 32 DISALLOW_COPY_AND_ASSIGN(SetAsDefaultBrowserUI); |
| 26 }; | 33 }; |
| 27 | 34 |
| 28 #endif // CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ | 35 #endif // CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_WIN_H_ |
| OLD | NEW |