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_new_window_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h" |
6 | 6 |
7 #include "ash/content/keyboard_overlay/keyboard_overlay_view.h" | 7 #include "ash/content/keyboard_overlay/keyboard_overlay_view.h" |
8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "chrome/browser/chromeos/file_manager/app_id.h" | 10 #include "chrome/browser/chromeos/file_manager/app_id.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 extensions::ExtensionSystem::Get(profile)->extension_service(); | 126 extensions::ExtensionSystem::Get(profile)->extension_service(); |
127 if (!service || | 127 if (!service || |
128 !extensions::util::IsAppLaunchableWithoutEnabling(kFileManagerAppId, | 128 !extensions::util::IsAppLaunchableWithoutEnabling(kFileManagerAppId, |
129 profile)) { | 129 profile)) { |
130 return; | 130 return; |
131 } | 131 } |
132 | 132 |
133 const extensions::Extension* const extension = | 133 const extensions::Extension* const extension = |
134 service->GetInstalledExtension(kFileManagerAppId); | 134 service->GetInstalledExtension(kFileManagerAppId); |
135 OpenApplication(CreateAppLaunchParamsUserContainer( | 135 OpenApplication(CreateAppLaunchParamsUserContainer( |
136 profile, extension, NEW_FOREGROUND_TAB, extensions::SOURCE_KEYBOARD)); | 136 profile, extension, WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 137 extensions::SOURCE_KEYBOARD)); |
137 } | 138 } |
138 | 139 |
139 void ChromeNewWindowDelegate::OpenCrosh() { | 140 void ChromeNewWindowDelegate::OpenCrosh() { |
140 Profile* profile = ProfileManager::GetActiveUserProfile(); | 141 Profile* profile = ProfileManager::GetActiveUserProfile(); |
141 GURL crosh_url = | 142 GURL crosh_url = |
142 extensions::TerminalExtensionHelper::GetCroshExtensionURL(profile); | 143 extensions::TerminalExtensionHelper::GetCroshExtensionURL(profile); |
143 if (!crosh_url.is_valid()) | 144 if (!crosh_url.is_valid()) |
144 return; | 145 return; |
145 chrome::ScopedTabbedBrowserDisplayer displayer(profile); | 146 chrome::ScopedTabbedBrowserDisplayer displayer(profile); |
146 Browser* browser = displayer.browser(); | 147 Browser* browser = displayer.browser(); |
147 content::WebContents* page = browser->OpenURL( | 148 content::WebContents* page = browser->OpenURL(content::OpenURLParams( |
148 content::OpenURLParams(crosh_url, content::Referrer(), NEW_FOREGROUND_TAB, | 149 crosh_url, content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
149 ui::PAGE_TRANSITION_GENERATED, false)); | 150 ui::PAGE_TRANSITION_GENERATED, false)); |
150 browser->window()->Show(); | 151 browser->window()->Show(); |
151 browser->window()->Activate(); | 152 browser->window()->Activate(); |
152 page->Focus(); | 153 page->Focus(); |
153 } | 154 } |
154 | 155 |
155 void ChromeNewWindowDelegate::OpenGetHelp() { | 156 void ChromeNewWindowDelegate::OpenGetHelp() { |
156 Profile* const profile = ProfileManager::GetActiveUserProfile(); | 157 Profile* const profile = ProfileManager::GetActiveUserProfile(); |
157 chrome::ShowHelpForProfile(profile, chrome::HELP_SOURCE_KEYBOARD); | 158 chrome::ShowHelpForProfile(profile, chrome::HELP_SOURCE_KEYBOARD); |
158 } | 159 } |
159 | 160 |
(...skipping 30 matching lines...) Expand all Loading... |
190 GURL(url)); | 191 GURL(url)); |
191 } | 192 } |
192 | 193 |
193 void ChromeNewWindowDelegate::ShowTaskManager() { | 194 void ChromeNewWindowDelegate::ShowTaskManager() { |
194 chrome::OpenTaskManager(NULL); | 195 chrome::OpenTaskManager(NULL); |
195 } | 196 } |
196 | 197 |
197 void ChromeNewWindowDelegate::OpenFeedbackPage() { | 198 void ChromeNewWindowDelegate::OpenFeedbackPage() { |
198 chrome::OpenFeedbackDialog(GetBrowserForActiveWindow()); | 199 chrome::OpenFeedbackDialog(GetBrowserForActiveWindow()); |
199 } | 200 } |
OLD | NEW |