Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/ui/views/ash/chrome_shell_delegate.cc

Issue 10456045: Refactored mobile activation engine outside of WebUI handler in order to expose its state to other … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/views/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/wm/partial_screenshot_view.h" 9 #include "ash/wm/partial_screenshot_view.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return; 179 return;
180 browser->OpenURL( 180 browser->OpenURL(
181 content::OpenURLParams(crosh_url, 181 content::OpenURLParams(crosh_url,
182 content::Referrer(), 182 content::Referrer(),
183 NEW_FOREGROUND_TAB, 183 NEW_FOREGROUND_TAB,
184 content::PAGE_TRANSITION_GENERATED, 184 content::PAGE_TRANSITION_GENERATED,
185 false)); 185 false));
186 #endif 186 #endif
187 } 187 }
188 188
189 void ChromeShellDelegate::OpenMobileSetup() { 189 void ChromeShellDelegate::OpenMobileSetup(const std::string& service_path) {
190 #if defined(OS_CHROMEOS) 190 #if defined(OS_CHROMEOS)
191 Browser* browser = browser::FindOrCreateTabbedBrowser( 191 Browser* browser = browser::FindOrCreateTabbedBrowser(
192 ProfileManager::GetDefaultProfileOrOffTheRecord()); 192 ProfileManager::GetDefaultProfileOrOffTheRecord());
193 if (CommandLine::ForCurrentProcess()->HasSwitch( 193 if (CommandLine::ForCurrentProcess()->HasSwitch(
194 switches::kEnableMobileSetupDialog)) { 194 switches::kEnableMobileSetupDialog)) {
195 MobileSetupDialog::Show(); 195 MobileSetupDialog::Show(service_path);
196 } else { 196 } else {
197 std::string url(chrome::kChromeUIMobileSetupURL);
198 url.append(service_path);
197 browser->OpenURL( 199 browser->OpenURL(
198 content::OpenURLParams(GURL(chrome::kChromeUIMobileSetupURL), 200 content::OpenURLParams(GURL(url),
199 content::Referrer(), 201 content::Referrer(),
200 NEW_FOREGROUND_TAB, 202 NEW_FOREGROUND_TAB,
201 content::PAGE_TRANSITION_LINK, 203 content::PAGE_TRANSITION_LINK,
202 false)); 204 false));
203 browser->window()->Activate(); 205 browser->window()->Activate();
204 } 206 }
205 #endif 207 #endif
206 } 208 }
207 209
208 void ChromeShellDelegate::RestoreTab() { 210 void ChromeShellDelegate::RestoreTab() {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 ash::Shell::GetInstance()->CreateLauncher(); 305 ash::Shell::GetInstance()->CreateLauncher();
304 break; 306 break;
305 default: 307 default:
306 NOTREACHED() << "Unexpected notification " << type; 308 NOTREACHED() << "Unexpected notification " << type;
307 } 309 }
308 #else 310 #else
309 // MSVC++ warns about switch statements without any cases. 311 // MSVC++ warns about switch statements without any cases.
310 NOTREACHED() << "Unexpected notification " << type; 312 NOTREACHED() << "Unexpected notification " << type;
311 #endif 313 #endif
312 } 314 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698