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 "apps/native_app_window.h" | 7 #include "apps/native_app_window.h" |
8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
9 #include "ash/keyboard_overlay/keyboard_overlay_view.h" | 9 #include "ash/keyboard_overlay/keyboard_overlay_view.h" |
10 #include "ash/wm/mru_window_tracker.h" | 10 #include "ash/wm/mru_window_tracker.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 chrome::OpenApplication( | 102 chrome::OpenApplication( |
103 chrome::AppLaunchParams(profile, extension, 0 /* event_flags */)); | 103 chrome::AppLaunchParams(profile, extension, 0 /* event_flags */)); |
104 } else { | 104 } else { |
105 // Activate the existing window. | 105 // Activate the existing window. |
106 list.front()->GetBaseWindow()->Activate(); | 106 list.front()->GetBaseWindow()->Activate(); |
107 } | 107 } |
108 } | 108 } |
109 } | 109 } |
110 | 110 |
111 void ChromeShellDelegate::OpenCrosh() { | 111 void ChromeShellDelegate::OpenCrosh() { |
112 GURL crosh_url = TerminalExtensionHelper::GetCroshExtensionURL( | 112 GURL crosh_url = extensions::TerminalExtensionHelper::GetCroshExtensionURL( |
113 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 113 ProfileManager::GetDefaultProfileOrOffTheRecord()); |
114 if (!crosh_url.is_valid()) | 114 if (!crosh_url.is_valid()) |
115 return; | 115 return; |
116 Browser* browser = GetTargetBrowser(); | 116 Browser* browser = GetTargetBrowser(); |
117 content::WebContents* page = browser->OpenURL( | 117 content::WebContents* page = browser->OpenURL( |
118 content::OpenURLParams(crosh_url, | 118 content::OpenURLParams(crosh_url, |
119 content::Referrer(), | 119 content::Referrer(), |
120 NEW_FOREGROUND_TAB, | 120 NEW_FOREGROUND_TAB, |
121 content::PAGE_TRANSITION_GENERATED, | 121 content::PAGE_TRANSITION_GENERATED, |
122 false)); | 122 false)); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 266 } |
267 | 267 |
268 void ChromeShellDelegate::PlatformInit() { | 268 void ChromeShellDelegate::PlatformInit() { |
269 registrar_.Add(this, | 269 registrar_.Add(this, |
270 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 270 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
271 content::NotificationService::AllSources()); | 271 content::NotificationService::AllSources()); |
272 registrar_.Add(this, | 272 registrar_.Add(this, |
273 chrome::NOTIFICATION_SESSION_STARTED, | 273 chrome::NOTIFICATION_SESSION_STARTED, |
274 content::NotificationService::AllSources()); | 274 content::NotificationService::AllSources()); |
275 } | 275 } |
OLD | NEW |