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 #include "chrome/browser/ui/startup/startup_browser_creator_win.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/win/metro.h" | 8 #include "base/win/metro.h" |
9 #include "chrome/browser/search_engines/template_url.h" | 9 #include "chrome/browser/search_engines/template_url.h" |
10 #include "chrome/browser/search_engines/template_url_service.h" | 10 #include "chrome/browser/search_engines/template_url_service.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return false; | 50 return false; |
51 | 51 |
52 // We activate an existing browser window if we are opening just the new tab | 52 // We activate an existing browser window if we are opening just the new tab |
53 // page in metro mode. | 53 // page in metro mode. |
54 if (startup_urls.size() > 1) | 54 if (startup_urls.size() > 1) |
55 return false; | 55 return false; |
56 | 56 |
57 if (startup_urls[0] != GURL(chrome::kChromeUINewTabURL)) | 57 if (startup_urls[0] != GURL(chrome::kChromeUINewTabURL)) |
58 return false; | 58 return false; |
59 | 59 |
60 Browser* browser = browser::FindBrowserWithProfile( | 60 Browser* browser = chrome::FindBrowserWithProfile( |
61 profile, chrome::HOST_DESKTOP_TYPE_NATIVE); | 61 profile, chrome::HOST_DESKTOP_TYPE_NATIVE); |
62 | 62 |
63 if (!browser) | 63 if (!browser) |
64 return false; | 64 return false; |
65 | 65 |
66 browser->window()->Show(); | 66 browser->window()->Show(); |
67 return true; | 67 return true; |
68 } | 68 } |
69 #endif | 69 #endif |
OLD | NEW |