1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_HOST_DESKTOP_H_ 6 #define CHROME_BROWSER_UI_HOST_DESKTOP_H_ 7 8 #include "ui/gfx/native_widget_types.h" 9 10 class Browser; 11 12 namespace chrome { 13 14 // A value that specifies what desktop environment hosts a particular piece of 15 // UI. You should almost never manually hardcode one of these enums manually, 16 // please refer to the following document for details on getting the right 17 // HostDesktopType: 18 // http://sites.google.com/a/chromium.org/dev/developers/design-documents/aura/multi-desktop 19 enum HostDesktopType { 20 HOST_DESKTOP_TYPE_FIRST = 0, 21 22 // The UI is hosted on the system native desktop. 23 HOST_DESKTOP_TYPE_NATIVE = HOST_DESKTOP_TYPE_FIRST, 24 25 // The UI is hosted in the synthetic Ash desktop. 26 #if defined(OS_CHROMEOS) 27 HOST_DESKTOP_TYPE_ASH = HOST_DESKTOP_TYPE_NATIVE, 28 #else 29 HOST_DESKTOP_TYPE_ASH, 30 #endif 31 32 HOST_DESKTOP_TYPE_COUNT 33 }; 34 35 HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view); 36 HostDesktopType GetHostDesktopTypeForNativeWindow( 37 gfx::NativeWindow native_window); 38 39 // Returns the type of host desktop most likely to be in use. This is the one 40 // most recently activated by the user. 41 // You should almost never use this outside of tests, please refer to the 42 // following document for details on getting the right HostDesktopType: 43 // http://sites.google.com/a/chromium.org/dev/developers/design-documents/aura/multi-desktop 44 HostDesktopType GetActiveDesktop(); 45 46 } // namespace chrome 47 48 #endif // CHROME_BROWSER_UI_HOST_DESKTOP_H_ 49