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/extensions/api/webstore_widget_private/app_installer.h" | 5 #include "chrome/browser/extensions/api/webstore_widget_private/app_installer.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "chrome/common/extensions/webstore_install_result.h" | 8 #include "chrome/common/extensions/webstore_install_result.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const { | 60 const { |
61 if (silent_installation_) | 61 if (silent_installation_) |
62 return nullptr; | 62 return nullptr; |
63 | 63 |
64 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( | 64 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( |
65 new ExtensionInstallPrompt::Prompt( | 65 new ExtensionInstallPrompt::Prompt( |
66 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); | 66 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); |
67 | 67 |
68 prompt->SetWebstoreData(localized_user_count(), show_user_count(), | 68 prompt->SetWebstoreData(localized_user_count(), show_user_count(), |
69 average_rating(), rating_count()); | 69 average_rating(), rating_count()); |
70 return prompt.Pass(); | 70 return prompt; |
71 } | 71 } |
72 | 72 |
73 bool AppInstaller::ShouldShowPostInstallUI() const { | 73 bool AppInstaller::ShouldShowPostInstallUI() const { |
74 return false; | 74 return false; |
75 } | 75 } |
76 | 76 |
77 bool AppInstaller::ShouldShowAppInstalledBubble() const { | 77 bool AppInstaller::ShouldShowAppInstalledBubble() const { |
78 return false; | 78 return false; |
79 } | 79 } |
80 | 80 |
(...skipping 17 matching lines...) Expand all Loading... |
98 return true; | 98 return true; |
99 } | 99 } |
100 | 100 |
101 void AppInstaller::OnWebContentsDestroyed(content::WebContents* web_contents) { | 101 void AppInstaller::OnWebContentsDestroyed(content::WebContents* web_contents) { |
102 callback_.Run(false, kWebContentsDestroyedError, | 102 callback_.Run(false, kWebContentsDestroyedError, |
103 extensions::webstore_install::OTHER_ERROR); | 103 extensions::webstore_install::OTHER_ERROR); |
104 AbortInstall(); | 104 AbortInstall(); |
105 } | 105 } |
106 | 106 |
107 } // namespace webstore_widget | 107 } // namespace webstore_widget |
OLD | NEW |