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

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

Issue 11195050: Merge 162279 - If chrome in desktop mode on Windows 8 defers to Windows 8 metro chrome, then we onl… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: 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/startup/startup_browser_creator_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/startup_browser_creator_win.cc
===================================================================
--- chrome/browser/ui/startup/startup_browser_creator_win.cc (revision 162788)
+++ chrome/browser/ui/startup/startup_browser_creator_win.cc (working copy)
@@ -9,6 +9,10 @@
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
+#include "chrome/common/url_constants.h"
namespace chrome {
@@ -35,3 +39,31 @@
}
} // namespace chrome
+
+#if !defined(USE_AURA)
+// static
+bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser(
+ Profile* profile,
+ const std::vector<GURL>& startup_urls) {
+ if (!base::win::IsMetroProcess())
+ return false;
+
+ // We activate an existing browser window if we are opening just the new tab
+ // page in metro mode.
+ if (startup_urls.size() > 1)
+ return false;
+
+ if (startup_urls[0] != GURL(chrome::kChromeUINewTabURL))
+ return false;
+
+ Browser* browser = browser::FindBrowserWithProfile(
+ profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
+
+ if (!browser)
+ return false;
+
+ browser->window()->Show();
+ return true;
+}
+#endif
+
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698