| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/extensions/apps_metro_handler_win.h" | 5 #include "chrome/browser/ui/extensions/apps_metro_handler_win.h" |
| 6 | 6 |
| 7 #include "apps/shell_window.h" |
| 7 #include "chrome/browser/extensions/shell_window_registry.h" | 8 #include "chrome/browser/extensions/shell_window_registry.h" |
| 8 #include "chrome/browser/ui/extensions/shell_window.h" | |
| 9 #include "chrome/browser/ui/simple_message_box.h" | 9 #include "chrome/browser/ui/simple_message_box.h" |
| 10 #include "grit/chromium_strings.h" | 10 #include "grit/chromium_strings.h" |
| 11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
| 12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
| 13 | 13 |
| 14 namespace chrome { | 14 namespace chrome { |
| 15 | 15 |
| 16 bool VerifySwitchToMetroForApps(gfx::NativeWindow parent_window) { | 16 bool VerifySwitchToMetroForApps(gfx::NativeWindow parent_window) { |
| 17 if (!extensions::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile( | 17 if (!extensions::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile( |
| 18 ShellWindow::WINDOW_TYPE_DEFAULT)) { | 18 apps::ShellWindow::WINDOW_TYPE_DEFAULT)) { |
| 19 return true; | 19 return true; |
| 20 } | 20 } |
| 21 | 21 |
| 22 MessageBoxResult result = ShowMessageBox( | 22 MessageBoxResult result = ShowMessageBox( |
| 23 parent_window, | 23 parent_window, |
| 24 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 24 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
| 25 l10n_util::GetStringUTF16(IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO), | 25 l10n_util::GetStringUTF16(IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO), |
| 26 MESSAGE_BOX_TYPE_OK_CANCEL); | 26 MESSAGE_BOX_TYPE_OK_CANCEL); |
| 27 | 27 |
| 28 return result == MESSAGE_BOX_RESULT_YES; | 28 return result == MESSAGE_BOX_RESULT_YES; |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace chrome | 31 } // namespace chrome |
| OLD | NEW |