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

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

Issue 10825284: Make Browser aware of HostDesktopType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« chrome/browser/ui/browser.h ('K') | « chrome/browser/ui/browser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 79859b4f4f9582a68c1fbb3586e4cd1ec612c9b2..6b25bed8ccf478fcef0e19df879a6ae8af2687b8 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -255,6 +255,14 @@ BrowserWindow* CreateBrowserWindow(Browser* browser) {
return BrowserWindow::CreateBrowserWindow(browser);
}
+#if defined(USE_ASH) && defined(OS_CHROMEOS)
+chrome::HostDesktopType kDefaultHostDesktopType = chrome::HOST_DESKTOP_TYPE_ASH;
+#else
+chrome::HostDesktopType kDefaultHostDesktopType =
+ chrome::HOST_DESKTOP_TYPE_NATIVE;
+#endif
+
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -263,6 +271,7 @@ BrowserWindow* CreateBrowserWindow(Browser* browser) {
Browser::CreateParams::CreateParams()
: type(TYPE_TABBED),
profile(NULL),
+ host_desktop_type(kDefaultHostDesktopType),
app_type(APP_TYPE_HOST),
initial_show_state(ui::SHOW_STATE_DEFAULT),
is_session_restore(false),
@@ -270,17 +279,31 @@ Browser::CreateParams::CreateParams()
}
Browser::CreateParams::CreateParams(Profile* profile)
- : type(TYPE_TABBED),
- profile(profile),
- app_type(APP_TYPE_HOST),
- initial_show_state(ui::SHOW_STATE_DEFAULT),
- is_session_restore(false),
- window(NULL) {
+ : type(TYPE_TABBED),
+ profile(profile),
+ host_desktop_type(kDefaultHostDesktopType),
+ app_type(APP_TYPE_HOST),
+ initial_show_state(ui::SHOW_STATE_DEFAULT),
+ is_session_restore(false),
+ window(NULL) {
}
Browser::CreateParams::CreateParams(Type type, Profile* profile)
: type(type),
profile(profile),
+ host_desktop_type(kDefaultHostDesktopType),
+ app_type(APP_TYPE_HOST),
+ initial_show_state(ui::SHOW_STATE_DEFAULT),
+ is_session_restore(false),
+ window(NULL) {
+}
+
+Browser::CreateParams::CreateParams(Type type,
+ Profile* profile,
+ chrome::HostDesktopType host_desktop_type)
+ : type(type),
+ profile(profile),
+ host_desktop_type(host_desktop_type),
app_type(APP_TYPE_HOST),
initial_show_state(ui::SHOW_STATE_DEFAULT),
is_session_restore(false),
@@ -335,6 +358,7 @@ Browser::Browser(const CreateParams& params)
override_bounds_(params.initial_bounds),
initial_show_state_(params.initial_show_state),
is_session_restore_(params.is_session_restore),
+ host_desktop_type_(params.host_desktop_type),
ALLOW_THIS_IN_INITIALIZER_LIST(
unload_controller_(new chrome::UnloadController(this))),
weak_factory_(this),
« chrome/browser/ui/browser.h ('K') | « chrome/browser/ui/browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698