summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 09:53:52 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 09:53:52 +0000
commit471e1e8f723af0914bd32ecdb4ea6aad99caac52 (patch)
tree1ec543afd73ae353349d2498711e2b134d9e73cb
parentc1433cc75121be1989781ee64d58b900c9c21596 (diff)
downloadchromium_src-471e1e8f723af0914bd32ecdb4ea6aad99caac52.zip
chromium_src-471e1e8f723af0914bd32ecdb4ea6aad99caac52.tar.gz
chromium_src-471e1e8f723af0914bd32ecdb4ea6aad99caac52.tar.bz2
Moved chrome/browser/ui/extensions apps code to chrome/browser/ui/apps
This is part of the ongoing effort to extract apps code from extensions. TBR=sky BUG=159366 Review URL: https://chromiumcodereview.appspot.com/22992003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217512 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/DEPS2
-rw-r--r--apps/launcher.cc2
-rw-r--r--chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc (renamed from chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc)2
-rw-r--r--chrome/browser/ui/apps/app_metro_infobar_delegate_win.h (renamed from chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h)6
-rw-r--r--chrome/browser/ui/apps/apps_metro_handler_win.cc (renamed from chrome/browser/ui/extensions/apps_metro_handler_win.cc)12
-rw-r--r--chrome/browser/ui/apps/apps_metro_handler_win.h (renamed from chrome/browser/ui/extensions/apps_metro_handler_win.h)10
-rw-r--r--chrome/browser/ui/browser_command_controller.cc4
-rw-r--r--chrome/browser/ui/views/app_list/app_list_controller_win.cc2
-rw-r--r--chrome/chrome_browser_ui.gypi8
9 files changed, 20 insertions, 28 deletions
diff --git a/apps/DEPS b/apps/DEPS
index 7920f1a..2cdf4b9 100644
--- a/apps/DEPS
+++ b/apps/DEPS
@@ -20,7 +20,7 @@ include_rules = [
"+chrome/browser/lifetime/application_lifetime.h",
"+chrome/browser/profiles",
"+chrome/browser/sessions/session_id.h",
- "+chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h",
+ "+chrome/browser/ui/apps/app_metro_infobar_delegate_win.h",
"+chrome/browser/ui/host_desktop.h",
"+chrome/common/chrome_switches.h",
"+chrome/common/extensions",
diff --git a/apps/launcher.cc b/apps/launcher.cc
index 9ebb46e..b99cd49 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -23,7 +23,7 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/lazy_background_task_queue.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
+#include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc b/chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc
index a08aa86..59cfd5b 100644
--- a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc
+++ b/chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
+#include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h"
#include "apps/app_launch_for_metro_restart_win.h"
#include "base/bind_helpers.h"
diff --git a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h b/chrome/browser/ui/apps/app_metro_infobar_delegate_win.h
index 1f625f7..920654e 100644
--- a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
+++ b/chrome/browser/ui/apps/app_metro_infobar_delegate_win.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
-#define CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
+#ifndef CHROME_BROWSER_UI_APPS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
+#define CHROME_BROWSER_UI_APPS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
#include <string>
@@ -49,4 +49,4 @@ class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate {
DISALLOW_COPY_AND_ASSIGN(AppMetroInfoBarDelegateWin);
};
-#endif // CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
+#endif // CHROME_BROWSER_UI_APPS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
diff --git a/chrome/browser/ui/extensions/apps_metro_handler_win.cc b/chrome/browser/ui/apps/apps_metro_handler_win.cc
index f59f675..d10bf2b 100644
--- a/chrome/browser/ui/extensions/apps_metro_handler_win.cc
+++ b/chrome/browser/ui/apps/apps_metro_handler_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/extensions/apps_metro_handler_win.h"
+#include "chrome/browser/ui/apps/apps_metro_handler_win.h"
#include "apps/shell_window.h"
#include "apps/shell_window_registry.h"
@@ -11,21 +11,17 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-namespace chrome {
-
bool VerifySwitchToMetroForApps(gfx::NativeWindow parent_window) {
if (!apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(
apps::ShellWindow::WINDOW_TYPE_DEFAULT)) {
return true;
}
- MessageBoxResult result = ShowMessageBox(
+ chrome::MessageBoxResult result = chrome::ShowMessageBox(
parent_window,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
l10n_util::GetStringUTF16(IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO),
- MESSAGE_BOX_TYPE_OK_CANCEL);
+ chrome::MESSAGE_BOX_TYPE_OK_CANCEL);
- return result == MESSAGE_BOX_RESULT_YES;
+ return result == chrome::MESSAGE_BOX_RESULT_YES;
}
-
-} // namespace chrome
diff --git a/chrome/browser/ui/extensions/apps_metro_handler_win.h b/chrome/browser/ui/apps/apps_metro_handler_win.h
index f1a79de..3d42725 100644
--- a/chrome/browser/ui/extensions/apps_metro_handler_win.h
+++ b/chrome/browser/ui/apps/apps_metro_handler_win.h
@@ -2,19 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_EXTENSIONS_APPS_METRO_HANDLER_WIN_H_
-#define CHROME_BROWSER_UI_EXTENSIONS_APPS_METRO_HANDLER_WIN_H_
+#ifndef CHROME_BROWSER_UI_APPS_APPS_METRO_HANDLER_WIN_H_
+#define CHROME_BROWSER_UI_APPS_APPS_METRO_HANDLER_WIN_H_
#include "ui/gfx/native_widget_types.h"
-namespace chrome {
-
// Check if there are apps running and if not, return true. Otherwise, Show a
// modal dialog on |parent| asking whether the user is OK with their packaged
// apps closing, in order to relaunch to metro mode. Returns true if the user
// clicks OK.
bool VerifySwitchToMetroForApps(gfx::NativeWindow parent);
-} // namespace chrome
-
-#endif // CHROME_BROWSER_UI_EXTENSIONS_APPS_METRO_HANDLER_WIN_H_
+#endif // CHROME_BROWSER_UI_APPS_APPS_METRO_HANDLER_WIN_H_
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 7429d58..04b90fb 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -46,7 +46,7 @@
#if defined(OS_WIN)
#include "base/win/metro.h"
#include "base/win/windows_version.h"
-#include "chrome/browser/ui/extensions/apps_metro_handler_win.h"
+#include "chrome/browser/ui/apps/apps_metro_handler_win.h"
#endif
#if defined(USE_ASH)
@@ -448,7 +448,7 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
content::RecordAction(content::UserMetricsAction("Win8DesktopRestart"));
break;
case IDC_WIN8_METRO_RESTART:
- if (!chrome::VerifySwitchToMetroForApps(window()->GetNativeWindow()))
+ if (!VerifySwitchToMetroForApps(window()->GetNativeWindow()))
break;
// SwitchToMetroUIHandler deletes itself.
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index 9dd3eff..3b334d2 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -32,8 +32,8 @@
#include "chrome/browser/ui/app_list/app_list_service_impl.h"
#include "chrome/browser/ui/app_list/app_list_service_win.h"
#include "chrome/browser/ui/app_list/app_list_view_delegate.h"
+#include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h"
#include "chrome/browser/ui/browser_commands.h"
-#include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/web_applications/web_app.h"
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 5eccd33..3b2553a 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -182,6 +182,10 @@
'browser/ui/app_modal_dialogs/javascript_dialog_manager.cc',
'browser/ui/app_modal_dialogs/javascript_dialog_manager.h',
'browser/ui/app_modal_dialogs/native_app_modal_dialog.h',
+ 'browser/ui/apps/app_metro_infobar_delegate_win.cc',
+ 'browser/ui/apps/app_metro_infobar_delegate_win.h',
+ 'browser/ui/apps/apps_metro_handler_win.cc',
+ 'browser/ui/apps/apps_metro_handler_win.h',
'browser/ui/apps/chrome_shell_window_delegate.cc',
'browser/ui/apps/chrome_shell_window_delegate.h',
'browser/ui/ash/ash_keyboard_controller_proxy.cc',
@@ -980,12 +984,8 @@
'browser/ui/crypto_module_password_dialog.h',
'browser/ui/crypto_module_password_dialog_nss.cc',
'browser/ui/crypto_module_password_dialog_openssl.cc',
- 'browser/ui/extensions/app_metro_infobar_delegate_win.cc',
- 'browser/ui/extensions/app_metro_infobar_delegate_win.h',
'browser/ui/extensions/application_launch.cc',
'browser/ui/extensions/application_launch.h',
- 'browser/ui/extensions/apps_metro_handler_win.cc',
- 'browser/ui/extensions/apps_metro_handler_win.h',
'browser/ui/extensions/extension_install_ui_default.cc',
'browser/ui/extensions/extension_install_ui_default.h',
'browser/ui/extensions/extension_enable_flow.cc',