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

Side by Side Diff: chrome/browser/chromeos/file_manager/app_installer.cc

Issue 313203004: Make ExtensionInstallPrompt::Prompt ref-counted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 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 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/chromeos/file_manager/app_installer.h" 5 #include "chrome/browser/chromeos/file_manager/app_installer.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 8
9 class Profile; 9 class Profile;
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 bool AppInstaller::CheckRequestorAlive() const { 56 bool AppInstaller::CheckRequestorAlive() const {
57 // The tab may have gone away - cancel installation in that case. 57 // The tab may have gone away - cancel installation in that case.
58 return web_contents_ != NULL; 58 return web_contents_ != NULL;
59 } 59 }
60 60
61 const GURL& AppInstaller::GetRequestorURL() const { 61 const GURL& AppInstaller::GetRequestorURL() const {
62 return GURL::EmptyGURL(); 62 return GURL::EmptyGURL();
63 } 63 }
64 64
65 scoped_ptr<ExtensionInstallPrompt::Prompt> 65 scoped_refptr<ExtensionInstallPrompt::Prompt>
66 AppInstaller::CreateInstallPrompt() const { 66 AppInstaller::CreateInstallPrompt() const {
67 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( 67 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt(
68 new ExtensionInstallPrompt::Prompt( 68 new ExtensionInstallPrompt::Prompt(
69 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); 69 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT));
70 70
71 prompt->SetWebstoreData(localized_user_count(), 71 prompt->SetWebstoreData(localized_user_count(),
72 show_user_count(), 72 show_user_count(),
73 average_rating(), 73 average_rating(),
74 rating_count()); 74 rating_count());
75 return prompt.Pass(); 75 return prompt;
76 } 76 }
77 77
78 bool AppInstaller::ShouldShowPostInstallUI() const { 78 bool AppInstaller::ShouldShowPostInstallUI() const {
79 return false; 79 return false;
80 } 80 }
81 81
82 bool AppInstaller::ShouldShowAppInstalledBubble() const { 82 bool AppInstaller::ShouldShowAppInstalledBubble() const {
83 return false; 83 return false;
84 } 84 }
85 85
(...skipping 17 matching lines...) Expand all
103 return true; 103 return true;
104 } 104 }
105 105
106 void AppInstaller::OnWebContentsDestroyed( 106 void AppInstaller::OnWebContentsDestroyed(
107 content::WebContents* web_contents) { 107 content::WebContents* web_contents) {
108 callback_.Run(false, kWebContentsDestroyedError); 108 callback_.Run(false, kWebContentsDestroyedError);
109 AbortInstall(); 109 AbortInstall();
110 } 110 }
111 111
112 } // namespace file_manager 112 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/app_installer.h ('k') | chrome/browser/extensions/extension_install_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698