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

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

Issue 1637943003: Remove HostDesktopType from BrowserList::GetInstance() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen-wrapper-land
Patch Set: mac2 Created 4 years, 11 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
« no previous file with comments | « chrome/browser/ui/host_desktop.h ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/host_desktop.cc
diff --git a/chrome/browser/ui/host_desktop.cc b/chrome/browser/ui/host_desktop.cc
index 5a2485010ff8f62c7778364f344408d8cb2a705d..239bd81e54ac264aaa98531f735083a1e1bae362 100644
--- a/chrome/browser/ui/host_desktop.cc
+++ b/chrome/browser/ui/host_desktop.cc
@@ -5,72 +5,22 @@
#include "chrome/browser/ui/host_desktop.h"
#include "build/build_config.h"
-#include "chrome/browser/ui/ash/ash_util.h"
-#include "chrome/browser/ui/aura/active_desktop_monitor.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
-#if defined(USE_ASH)
-#include "ash/shell.h"
-#endif
namespace chrome {
HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view) {
-#if defined(USE_ASH)
- // TODO(ananta)
- // Once we've threaded creation context to wherever needed, we should remove
- // this check here.
-#if defined(OS_WIN)
- if (!native_view)
- return GetActiveDesktop();
-#endif
- return IsNativeViewInAsh(native_view) ?
- HOST_DESKTOP_TYPE_ASH :
- HOST_DESKTOP_TYPE_NATIVE;
-#else
+ // TODO(scottmg): This file is being removed: http://crbug.com/558054.
return HOST_DESKTOP_TYPE_NATIVE;
-#endif
}
HostDesktopType GetHostDesktopTypeForNativeWindow(
gfx::NativeWindow native_window) {
-#if defined(USE_ASH)
- // TODO(ananta)
- // Once we've threaded creation context to wherever needed, we should remove
- // this check here.
-#if defined(OS_WIN)
- if (!native_window)
- return GetActiveDesktop();
-#endif
- return IsNativeWindowInAsh(native_window) ?
- HOST_DESKTOP_TYPE_ASH :
- HOST_DESKTOP_TYPE_NATIVE;
-#else
+ // TODO(scottmg): This file is being removed: http://crbug.com/558054.
return HOST_DESKTOP_TYPE_NATIVE;
-#endif
}
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
- // will be considered the last active if a user switches from metro Chrome to
- // the Windows desktop but doesn't activate any Chrome windows there (e.g.,
- // by clicking on one or otherwise giving one focus). Consider finding a way
- // to detect that the Windows desktop has been activated so that the native
- // 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) &&
- ash::Shell::HasInstance()) {
- return HOST_DESKTOP_TYPE_ASH;
- }
-#endif
+ // TODO(scottmg): This file is being removed: http://crbug.com/558054.
return HOST_DESKTOP_TYPE_NATIVE;
}
« no previous file with comments | « chrome/browser/ui/host_desktop.h ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698