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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 for (std::vector<Profile*>::const_iterator it = profiles.begin(); | 184 for (std::vector<Profile*>::const_iterator it = profiles.begin(); |
185 it != profiles.end(); ++it) { | 185 it != profiles.end(); ++it) { |
186 SigninErrorNotifierFactory::GetForProfile(*it); | 186 SigninErrorNotifierFactory::GetForProfile(*it); |
187 SyncErrorNotifierFactory::GetForProfile(*it); | 187 SyncErrorNotifierFactory::GetForProfile(*it); |
188 } | 188 } |
189 | 189 |
190 #if defined(OS_WIN) | 190 #if defined(OS_WIN) |
191 // If we are launched to service a windows 8 search request then let the | 191 // If we are launched to service a windows 8 search request then let the |
192 // IPC which carries the search string create the browser and initiate | 192 // IPC which carries the search string create the browser and initiate |
193 // the navigation. | 193 // the navigation. |
194 if (CommandLine::ForCurrentProcess()->HasSwitch( | 194 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
195 switches::kWindows8Search)) | 195 switches::kWindows8Search)) |
196 break; | 196 break; |
197 #endif | 197 #endif |
198 // If Chrome ASH is launched when no browser is open in the desktop, | 198 // If Chrome ASH is launched when no browser is open in the desktop, |
199 // we should execute the startup code. | 199 // we should execute the startup code. |
200 // If there are browsers open in the desktop, we create a browser window | 200 // If there are browsers open in the desktop, we create a browser window |
201 // and open a new tab page, if session restore is not on. | 201 // and open a new tab page, if session restore is not on. |
202 BrowserList* desktop_list = BrowserList::GetInstance( | 202 BrowserList* desktop_list = BrowserList::GetInstance( |
203 chrome::HOST_DESKTOP_TYPE_NATIVE); | 203 chrome::HOST_DESKTOP_TYPE_NATIVE); |
204 if (desktop_list->empty()) { | 204 if (desktop_list->empty()) { |
205 // 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 |
206 // silent-mode by the metro viewer process, which causes the | 206 // silent-mode by the metro viewer process, which causes the |
207 // StartupBrowserCreatorImpl class to not create any browsers which is | 207 // StartupBrowserCreatorImpl class to not create any browsers which is |
208 // not the behavior we want. | 208 // not the behavior we want. |
209 CommandLine dummy(CommandLine::NO_PROGRAM); | 209 base::CommandLine dummy(base::CommandLine::NO_PROGRAM); |
210 StartupBrowserCreatorImpl startup_impl( | 210 StartupBrowserCreatorImpl startup_impl( |
211 base::FilePath(), | 211 base::FilePath(), |
212 dummy, | 212 dummy, |
213 chrome::startup::IS_NOT_FIRST_RUN); | 213 chrome::startup::IS_NOT_FIRST_RUN); |
214 startup_impl.Launch( | 214 startup_impl.Launch( |
215 ProfileManager::GetActiveUserProfile(), | 215 ProfileManager::GetActiveUserProfile(), |
216 std::vector<GURL>(), | 216 std::vector<GURL>(), |
217 true, | 217 true, |
218 chrome::HOST_DESKTOP_TYPE_ASH); | 218 chrome::HOST_DESKTOP_TYPE_ASH); |
219 } else { | 219 } else { |
(...skipping 24 matching lines...) Expand all Loading... |
244 chrome::NOTIFICATION_PROFILE_ADDED, | 244 chrome::NOTIFICATION_PROFILE_ADDED, |
245 content::NotificationService::AllSources()); | 245 content::NotificationService::AllSources()); |
246 registrar_.Add(this, | 246 registrar_.Add(this, |
247 chrome::NOTIFICATION_ASH_SESSION_STARTED, | 247 chrome::NOTIFICATION_ASH_SESSION_STARTED, |
248 content::NotificationService::AllSources()); | 248 content::NotificationService::AllSources()); |
249 registrar_.Add(this, | 249 registrar_.Add(this, |
250 chrome::NOTIFICATION_ASH_SESSION_ENDED, | 250 chrome::NOTIFICATION_ASH_SESSION_ENDED, |
251 content::NotificationService::AllSources()); | 251 content::NotificationService::AllSources()); |
252 #endif | 252 #endif |
253 } | 253 } |
OLD | NEW |