| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_INSTANT_INSTANT_CONFIRM_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONFIRM_DIALOG_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONFIRM_DIALOG_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONFIRM_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "gfx/native_widget_types.h" | 9 #include "gfx/native_widget_types.h" |
| 10 | 10 |
| 11 class Profile; | 11 class Profile; |
| 12 | 12 |
| 13 namespace browser { | 13 namespace browser { |
| 14 | 14 |
| 15 // URL for learning more about instant. | 15 // URL for learning more about instant. |
| 16 extern const char kInstantLearnMoreURL[]; | 16 extern const char kInstantLearnMoreURL[]; |
| 17 | 17 |
| 18 // Invoked from the opt-in and preferences when the user toggles instant. If the | 18 // Invoked from the opt-in and preferences when the user toggles instant. If the |
| 19 // instant confirm dialog hasn't been shown, it's shown. If the instant dialog | 19 // instant confirm dialog hasn't been shown, it's shown. If the instant dialog |
| 20 // has already been shown the dialog is not shown but the preference is toggled. | 20 // has already been shown the dialog is not shown but the preference is toggled. |
| 21 void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent, | 21 void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent, |
| 22 Profile* profile); | 22 Profile* profile); |
| 23 | 23 |
| 24 // Shows the platform specific dialog to confirm if the user really wants to | 24 // Shows the platform specific dialog to confirm if the user really wants to |
| 25 // enable instant. If the user accepts the dialog implementations must set | 25 // enable instant. If the user accepts the dialog invoke |
| 26 // both |prefs::kInstantEnabled| and |prefs::kInstantConfirmDialogShown| to | 26 // InstantController::Enable. |
| 27 // true. | |
| 28 void ShowInstantConfirmDialog(gfx::NativeWindow parent, | 27 void ShowInstantConfirmDialog(gfx::NativeWindow parent, |
| 29 Profile* profile); | 28 Profile* profile); |
| 30 | 29 |
| 31 } // namespace browser | 30 } // namespace browser |
| 32 | 31 |
| 33 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONFIRM_DIALOG_H_ | 32 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONFIRM_DIALOG_H_ |
| OLD | NEW |