Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5062)

Unified Diff: chrome/browser/ui/host_desktop.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/host_desktop.cc
diff --git a/chrome/browser/ui/host_desktop.cc b/chrome/browser/ui/host_desktop.cc
index bf90814eb8a6e5a6eb7afd804eb8e42feb2e0e0b..00a8d8c65af6b05abe09b5ef0e2abad4e9dd8427 100644
--- a/chrome/browser/ui/host_desktop.cc
+++ b/chrome/browser/ui/host_desktop.cc
@@ -19,7 +19,8 @@
namespace chrome {
-HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view) {
+ui::HostDesktopType GetHostDesktopTypeForNativeView(
+ gfx::NativeView native_view) {
#if defined(USE_ASH)
// TODO(ananta)
// Once we've threaded creation context to wherever needed, we should remove
@@ -28,15 +29,14 @@ HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view) {
if (!native_view)
return GetActiveDesktop();
#endif
- return IsNativeViewInAsh(native_view) ?
- HOST_DESKTOP_TYPE_ASH :
- HOST_DESKTOP_TYPE_NATIVE;
+ return IsNativeViewInAsh(native_view) ? ui::HOST_DESKTOP_TYPE_ASH
+ : ui::HOST_DESKTOP_TYPE_NATIVE;
#else
- return HOST_DESKTOP_TYPE_NATIVE;
+ return ui::HOST_DESKTOP_TYPE_NATIVE;
#endif
}
-HostDesktopType GetHostDesktopTypeForNativeWindow(
+ui::HostDesktopType GetHostDesktopTypeForNativeWindow(
gfx::NativeWindow native_window) {
#if defined(USE_ASH)
// TODO(ananta)
@@ -46,15 +46,14 @@ HostDesktopType GetHostDesktopTypeForNativeWindow(
if (!native_window)
return GetActiveDesktop();
#endif
- return IsNativeWindowInAsh(native_window) ?
- HOST_DESKTOP_TYPE_ASH :
- HOST_DESKTOP_TYPE_NATIVE;
+ return IsNativeWindowInAsh(native_window) ? ui::HOST_DESKTOP_TYPE_ASH
+ : ui::HOST_DESKTOP_TYPE_NATIVE;
#else
- return HOST_DESKTOP_TYPE_NATIVE;
+ return ui::HOST_DESKTOP_TYPE_NATIVE;
#endif
}
-HostDesktopType GetActiveDesktop() {
+ui::HostDesktopType GetActiveDesktop() {
#if defined(USE_ASH) && !defined(OS_CHROMEOS)
// The Ash desktop is considered active if a non-desktop RootWindow was last
// activated and the Ash desktop is still open. As it is, the Ash desktop
@@ -65,12 +64,12 @@ HostDesktopType GetActiveDesktop() {
// desktop can be considered active once the user switches to it if its
// BrowserList isn't empty.
if ((ActiveDesktopMonitor::GetLastActivatedDesktopType() ==
- chrome::HOST_DESKTOP_TYPE_ASH) &&
+ ui::HOST_DESKTOP_TYPE_ASH) &&
ash::Shell::HasInstance()) {
- return HOST_DESKTOP_TYPE_ASH;
+ return ui::HOST_DESKTOP_TYPE_ASH;
}
#endif
- return HOST_DESKTOP_TYPE_NATIVE;
+ return ui::HOST_DESKTOP_TYPE_NATIVE;
}
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698