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

Side by Side Diff: chrome/browser/apps/ephemeral_app_launcher.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
OLDNEW
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/apps/ephemeral_app_launcher.h" 5 #include "chrome/browser/apps/ephemeral_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_install_checker.h" 9 #include "chrome/browser/extensions/extension_install_checker.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 bool EphemeralAppLauncher::LaunchHostedApp(const Extension* extension) const { 286 bool EphemeralAppLauncher::LaunchHostedApp(const Extension* extension) const {
287 GURL launch_url = extensions::AppLaunchInfo::GetLaunchWebURL(extension); 287 GURL launch_url = extensions::AppLaunchInfo::GetLaunchWebURL(extension);
288 if (!launch_url.is_valid()) 288 if (!launch_url.is_valid())
289 return false; 289 return false;
290 290
291 chrome::ScopedTabbedBrowserDisplayer displayer( 291 chrome::ScopedTabbedBrowserDisplayer displayer(
292 profile(), chrome::GetHostDesktopTypeForNativeWindow(parent_window_)); 292 profile(), chrome::GetHostDesktopTypeForNativeWindow(parent_window_));
293 chrome::NavigateParams params( 293 chrome::NavigateParams params(
294 displayer.browser(), launch_url, content::PAGE_TRANSITION_AUTO_TOPLEVEL); 294 displayer.browser(), launch_url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
295 params.disposition = NEW_FOREGROUND_TAB; 295 params.disposition = NEW_FOREGROUND_TAB;
296 chrome::Navigate(&params); 296 chrome::Navigate(&params);
297 return true; 297 return true;
298 } 298 }
299 299
300 void EphemeralAppLauncher::InvokeCallback(webstore_install::Result result, 300 void EphemeralAppLauncher::InvokeCallback(webstore_install::Result result,
301 const std::string& error) { 301 const std::string& error) {
302 if (!launch_callback_.is_null()) { 302 if (!launch_callback_.is_null()) {
303 LaunchCallback callback = launch_callback_; 303 LaunchCallback callback = launch_callback_;
304 launch_callback_.Reset(); 304 launch_callback_.Reset();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 456
457 // CompleteInstall will call Release. 457 // CompleteInstall will call Release.
458 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS, 458 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS,
459 std::string()); 459 std::string());
460 } 460 }
461 461
462 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) { 462 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) {
463 // CompleteInstall will call Release. 463 // CompleteInstall will call Release.
464 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError); 464 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
465 } 465 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_url_redirector_browsertest.cc ('k') | chrome/browser/apps/install_chrome_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698