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

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

Issue 11146023: Work on separate browser contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another busted command line flag Created 8 years, 2 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/browser_list.cc ('k') | chrome/browser/ui/host_desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/host_desktop.h
diff --git a/chrome/browser/ui/host_desktop.h b/chrome/browser/ui/host_desktop.h
index 2476ae635c4b69119bbf9eeb768c552f5f9f4fda..b32b031c7de5039b6f2d9c5fc2dbb2be06dafeb0 100644
--- a/chrome/browser/ui/host_desktop.h
+++ b/chrome/browser/ui/host_desktop.h
@@ -5,14 +5,20 @@
#ifndef CHROME_BROWSER_UI_HOST_DESKTOP_H_
#define CHROME_BROWSER_UI_HOST_DESKTOP_H_
+#include "ui/gfx/native_widget_types.h"
+
+class Browser;
+
namespace chrome {
// A value that specifies what desktop environment hosts a particular piece of
// UI.
// Note that HOST_DESKTOP_TYPE_ASH is always used on ChromeOS.
enum HostDesktopType {
+ HOST_DESKTOP_TYPE_FIRST = 0,
+
// The UI is hosted on the system native desktop.
- HOST_DESKTOP_TYPE_NATIVE = 0,
+ HOST_DESKTOP_TYPE_NATIVE = HOST_DESKTOP_TYPE_FIRST,
// The UI is hosted in the synthetic Ash desktop.
#if defined(OS_CHROMEOS)
@@ -24,13 +30,25 @@ enum HostDesktopType {
HOST_DESKTOP_TYPE_COUNT
};
-/*
-TODO(beng): implement utilities as needed, e.g.:
-HostDesktopType GetActiveDesktop();
+// Used during initialization to override parenting.
+class ScopedForceDesktopType {
+ public:
+ explicit ScopedForceDesktopType(HostDesktopType type);
+ ~ScopedForceDesktopType();
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedForceDesktopType);
+ HostDesktopType previous_type_;
+ bool previous_force_;
+};
+
HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view);
HostDesktopType GetHostDesktopTypeForNativeWindow(
gfx::NativeWindow native_window);
-HostDesktopType GetHostDesktopTypeForBrowser(Browser* browser);
+HostDesktopType GetHostDesktopTypeForBrowser(const Browser* browser);
+
+/*
+TODO(beng): implement utilities as needed, e.g.:
+HostDesktopType GetActiveDesktop();
*/
} // namespace chrome
« no previous file with comments | « chrome/browser/ui/browser_list.cc ('k') | chrome/browser/ui/host_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698