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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_list.cc ('k') | chrome/browser/ui/host_desktop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/native_widget_types.h"
9
10 class Browser;
11
8 namespace chrome { 12 namespace chrome {
9 13
10 // A value that specifies what desktop environment hosts a particular piece of 14 // A value that specifies what desktop environment hosts a particular piece of
11 // UI. 15 // UI.
12 // Note that HOST_DESKTOP_TYPE_ASH is always used on ChromeOS. 16 // Note that HOST_DESKTOP_TYPE_ASH is always used on ChromeOS.
13 enum HostDesktopType { 17 enum HostDesktopType {
18 HOST_DESKTOP_TYPE_FIRST = 0,
19
14 // The UI is hosted on the system native desktop. 20 // The UI is hosted on the system native desktop.
15 HOST_DESKTOP_TYPE_NATIVE = 0, 21 HOST_DESKTOP_TYPE_NATIVE = HOST_DESKTOP_TYPE_FIRST,
16 22
17 // The UI is hosted in the synthetic Ash desktop. 23 // The UI is hosted in the synthetic Ash desktop.
18 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
19 HOST_DESKTOP_TYPE_ASH = HOST_DESKTOP_TYPE_NATIVE, 25 HOST_DESKTOP_TYPE_ASH = HOST_DESKTOP_TYPE_NATIVE,
20 #else 26 #else
21 HOST_DESKTOP_TYPE_ASH, 27 HOST_DESKTOP_TYPE_ASH,
22 #endif 28 #endif
23 29
24 HOST_DESKTOP_TYPE_COUNT 30 HOST_DESKTOP_TYPE_COUNT
25 }; 31 };
26 32
33 // Used during initialization to override parenting.
34 class ScopedForceDesktopType {
35 public:
36 explicit ScopedForceDesktopType(HostDesktopType type);
37 ~ScopedForceDesktopType();
38 private:
39 DISALLOW_COPY_AND_ASSIGN(ScopedForceDesktopType);
40 HostDesktopType previous_type_;
41 bool previous_force_;
42 };
43
44 HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view);
45 HostDesktopType GetHostDesktopTypeForNativeWindow(
46 gfx::NativeWindow native_window);
47 HostDesktopType GetHostDesktopTypeForBrowser(const Browser* browser);
48
27 /* 49 /*
28 TODO(beng): implement utilities as needed, e.g.: 50 TODO(beng): implement utilities as needed, e.g.:
29 HostDesktopType GetActiveDesktop(); 51 HostDesktopType GetActiveDesktop();
30 HostDesktopType GetHostDesktopTypeForNativeView(gfx::NativeView native_view);
31 HostDesktopType GetHostDesktopTypeForNativeWindow(
32 gfx::NativeWindow native_window);
33 HostDesktopType GetHostDesktopTypeForBrowser(Browser* browser);
34 */ 52 */
35 53
36 } // namespace chrome 54 } // namespace chrome
37 55
38 #endif // CHROME_BROWSER_UI_HOST_DESKTOP_H_ 56 #endif // CHROME_BROWSER_UI_HOST_DESKTOP_H_
OLDNEW
« 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