| 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/apps/apps_metro_handler_win.h" |
| 6 | 6 |
| 7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
| 8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.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 { | |
| 15 | |
| 16 bool VerifySwitchToMetroForApps(gfx::NativeWindow parent_window) { | 14 bool VerifySwitchToMetroForApps(gfx::NativeWindow parent_window) { |
| 17 if (!apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile( | 15 if (!apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile( |
| 18 apps::ShellWindow::WINDOW_TYPE_DEFAULT)) { | 16 apps::ShellWindow::WINDOW_TYPE_DEFAULT)) { |
| 19 return true; | 17 return true; |
| 20 } | 18 } |
| 21 | 19 |
| 22 MessageBoxResult result = ShowMessageBox( | 20 chrome::MessageBoxResult result = chrome::ShowMessageBox( |
| 23 parent_window, | 21 parent_window, |
| 24 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 22 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
| 25 l10n_util::GetStringUTF16(IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO), | 23 l10n_util::GetStringUTF16(IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO), |
| 26 MESSAGE_BOX_TYPE_OK_CANCEL); | 24 chrome::MESSAGE_BOX_TYPE_OK_CANCEL); |
| 27 | 25 |
| 28 return result == MESSAGE_BOX_RESULT_YES; | 26 return result == chrome::MESSAGE_BOX_RESULT_YES; |
| 29 } | 27 } |
| 30 | |
| 31 } // namespace chrome | |
| OLD | NEW |