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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |