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