| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_HOST_DESKTOP_H_ | 5 #ifndef CHROME_BROWSER_UI_HOST_DESKTOP_H_ |
| 6 #define CHROME_BROWSER_UI_HOST_DESKTOP_H_ | 6 #define CHROME_BROWSER_UI_HOST_DESKTOP_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/host_desktop_type.h" |
| 8 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 9 | 10 |
| 10 class Browser; | 11 class Browser; |
| 11 | 12 |
| 12 namespace chrome { | 13 namespace chrome { |
| 13 | 14 |
| 14 // A value that specifies what desktop environment hosts a particular piece of | 15 ui::HostDesktopType GetHostDesktopTypeForNativeView( |
| 15 // UI. You should almost never manually hardcode one of these enums manually, | 16 gfx::NativeView native_view); |
| 16 // please refer to the following document for details on getting the right | 17 ui::HostDesktopType GetHostDesktopTypeForNativeWindow( |
| 17 // HostDesktopType: | |
| 18 // http://sites.google.com/a/chromium.org/dev/developers/design-documents/aura/m
ulti-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); | 18 gfx::NativeWindow native_window); |
| 38 | 19 |
| 39 // Returns the type of host desktop most likely to be in use. This is the one | 20 // Returns the type of host desktop most likely to be in use. This is the one |
| 40 // most recently activated by the user. | 21 // most recently activated by the user. |
| 41 // You should almost never use this outside of tests, please refer to the | 22 // You should almost never use this outside of tests, please refer to the |
| 42 // following document for details on getting the right HostDesktopType: | 23 // following document for details on getting the right ui::HostDesktopType: |
| 43 // http://sites.google.com/a/chromium.org/dev/developers/design-documents/aura/m
ulti-desktop | 24 // http://sites.google.com/a/chromium.org/dev/developers/design-documents/aura/m
ulti-desktop |
| 44 HostDesktopType GetActiveDesktop(); | 25 ui::HostDesktopType GetActiveDesktop(); |
| 45 | 26 |
| 46 } // namespace chrome | 27 } // namespace chrome |
| 47 | 28 |
| 48 #endif // CHROME_BROWSER_UI_HOST_DESKTOP_H_ | 29 #endif // CHROME_BROWSER_UI_HOST_DESKTOP_H_ |
| OLD | NEW |