12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file. 42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/browser/extensions/webstore_startup_installer.h" 62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace extensions { 82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)WebstoreStartupInstaller::WebstoreStartupInstaller( 102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& webstore_item_id, 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) Profile* profile, 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) bool show_prompt, 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const Callback& callback) 14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) : WebstoreInstallWithPrompt(webstore_item_id, profile, callback), 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) show_prompt_(show_prompt) { 16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE); 175f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) set_show_post_install_ui(false); 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)WebstoreStartupInstaller::~WebstoreStartupInstaller() {} 212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 22f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)scoped_refptr<ExtensionInstallPrompt::Prompt> 232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)WebstoreStartupInstaller::CreateInstallPrompt() const { 24cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) if (show_prompt_) { 25f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) return new ExtensionInstallPrompt::Prompt( 26f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) ExtensionInstallPrompt::INSTALL_PROMPT); 27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) } 28f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) return NULL; 292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} 302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} // namespace extensions 32