Chromium Code Reviews| 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_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/views/widget/widget.h" | |
| 9 #include "ui/web_dialogs/web_dialog_ui.h" | 10 #include "ui/web_dialogs/web_dialog_ui.h" |
| 10 | 11 |
| 11 class Browser; | 12 class Browser; |
| 12 class Profile; | 13 class Profile; |
| 13 | 14 |
| 14 // The UI used in first-run flow to prompt the user to set Chrome as the | 15 // 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 | 16 // default Windows browser and *the browser* of Metro mode. Intended for |
| 16 // Windows 8 only. | 17 // Windows 8 only. |
| 17 class SetAsDefaultBrowserUI : public ui::WebDialogUI { | 18 class SetAsDefaultBrowserUI : public ui::WebDialogUI { |
| 18 public: | 19 public: |
| 19 explicit SetAsDefaultBrowserUI(content::WebUI* web_ui); | 20 explicit SetAsDefaultBrowserUI(content::WebUI* web_ui); |
| 20 | 21 |
| 21 // Present metroizer UI either in a new singleton tab or in a dialog window. | 22 // Present metroizer UI either in a new singleton tab or in a dialog window. |
| 22 static void Show(Profile* profile, Browser* browser); | 23 static void Show(Profile* profile, Browser* browser); |
| 23 | 24 |
| 25 // Returns the web dialog widget for testing. | |
| 26 static views::Widget* GetDialogWidgetForTesting(); | |
|
sky
2016/07/06 19:21:19
Instead of exposing this can you make Show() retur
zmin
2016/07/06 20:04:31
Yes, I can. However, the challenge is the browser
sky
2016/07/06 23:53:16
Would an IsVisible() function work on this class?
zmin
2016/07/18 21:12:14
There is no instance of SetAsDefaultBrowserUI crea
| |
| 27 | |
| 24 private: | 28 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(SetAsDefaultBrowserUI); | 29 DISALLOW_COPY_AND_ASSIGN(SetAsDefaultBrowserUI); |
| 26 }; | 30 }; |
| 27 | 31 |
| 28 #endif // CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ | 32 #endif // CHROME_BROWSER_UI_WEBUI_SET_AS_DEFAULT_BROWSER_UI_H_ |
| OLD | NEW |