OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
10 #include "ash/media_delegate.h" | 10 #include "ash/media_delegate.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // IPC which carries the search string create the browser and initiate | 193 // IPC which carries the search string create the browser and initiate |
194 // the navigation. | 194 // the navigation. |
195 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 195 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
196 switches::kWindows8Search)) | 196 switches::kWindows8Search)) |
197 break; | 197 break; |
198 #endif | 198 #endif |
199 // If Chrome ASH is launched when no browser is open in the desktop, | 199 // If Chrome ASH is launched when no browser is open in the desktop, |
200 // we should execute the startup code. | 200 // we should execute the startup code. |
201 // If there are browsers open in the desktop, we create a browser window | 201 // If there are browsers open in the desktop, we create a browser window |
202 // and open a new tab page, if session restore is not on. | 202 // and open a new tab page, if session restore is not on. |
203 BrowserList* desktop_list = BrowserList::GetInstance( | 203 BrowserList* desktop_list = BrowserList::GetInstance(); |
204 chrome::HOST_DESKTOP_TYPE_NATIVE); | |
205 if (desktop_list->empty()) { | 204 if (desktop_list->empty()) { |
206 // We pass a dummy command line here, because the browser is launched in | 205 // We pass a dummy command line here, because the browser is launched in |
207 // silent-mode by the metro viewer process, which causes the | 206 // silent-mode by the metro viewer process, which causes the |
208 // StartupBrowserCreatorImpl class to not create any browsers which is | 207 // StartupBrowserCreatorImpl class to not create any browsers which is |
209 // not the behavior we want. | 208 // not the behavior we want. |
210 base::CommandLine dummy(base::CommandLine::NO_PROGRAM); | 209 base::CommandLine dummy(base::CommandLine::NO_PROGRAM); |
211 StartupBrowserCreatorImpl startup_impl( | 210 StartupBrowserCreatorImpl startup_impl( |
212 base::FilePath(), | 211 base::FilePath(), |
213 dummy, | 212 dummy, |
214 chrome::startup::IS_NOT_FIRST_RUN); | 213 chrome::startup::IS_NOT_FIRST_RUN); |
(...skipping 30 matching lines...) Expand all Loading... |
245 chrome::NOTIFICATION_PROFILE_ADDED, | 244 chrome::NOTIFICATION_PROFILE_ADDED, |
246 content::NotificationService::AllSources()); | 245 content::NotificationService::AllSources()); |
247 registrar_.Add(this, | 246 registrar_.Add(this, |
248 chrome::NOTIFICATION_ASH_SESSION_STARTED, | 247 chrome::NOTIFICATION_ASH_SESSION_STARTED, |
249 content::NotificationService::AllSources()); | 248 content::NotificationService::AllSources()); |
250 registrar_.Add(this, | 249 registrar_.Add(this, |
251 chrome::NOTIFICATION_ASH_SESSION_ENDED, | 250 chrome::NOTIFICATION_ASH_SESSION_ENDED, |
252 content::NotificationService::AllSources()); | 251 content::NotificationService::AllSources()); |
253 #endif | 252 #endif |
254 } | 253 } |
OLD | NEW |