Chromium Code Reviews| Index: chrome/browser/chromeos/extensions/file_manager/webstore_app_installer.h |
| diff --git a/chrome/browser/chromeos/extensions/file_manager/webstore_app_installer.h b/chrome/browser/chromeos/extensions/file_manager/webstore_app_installer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1ab4b014426c1794455d1076d84091d9616164ae |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/extensions/file_manager/webstore_app_installer.h |
| @@ -0,0 +1,65 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_WEBSTORE_APP_INSTALLER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_WEBSTORE_APP_INSTALLER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "chrome/browser/extensions/webstore_standalone_installer.h" |
| +#include "content/public/browser/web_contents_observer.h" |
| + |
| +namespace content { |
| +class WebContents; |
| +} |
| + |
| +namespace file_manager { |
| + |
| +// Installer for Files.app. |
| +class WebstoreAppInstaller |
|
asargent_no_longer_on_chrome
2013/08/27 18:22:33
This class name is confusingly similar to Webstor
yoshiki
2013/08/28 13:19:04
Done.
|
| + : public extensions::WebstoreStandaloneInstaller, |
| + public content::WebContentsObserver { |
| + public: |
| + typedef extensions::WebstoreStandaloneInstaller::Callback Callback; |
| + |
| + WebstoreAppInstaller(content::WebContents* web_contents, |
| + const std::string& webstore_item_id, |
| + Profile* profile, |
| + const Callback& callback); |
|
asargent_no_longer_on_chrome
2013/08/27 18:22:33
nit: indentation is off on these 3 lines
yoshiki
2013/08/28 13:19:04
Done.
|
| + |
| + protected: |
| + friend class base::RefCountedThreadSafe<WebstoreAppInstaller>; |
| + |
| + virtual ~WebstoreAppInstaller(); |
| + |
| + // Implementations WebstoreStandaloneInstaller Template Method's hooks. |
|
asargent_no_longer_on_chrome
2013/08/27 18:22:33
nit: to be pedantic, it's not a template (in the C
yoshiki
2013/08/28 13:19:04
Thanks, I grep'd and have found "// SomeClassName
|
| + virtual bool CheckRequestorAlive() const OVERRIDE; |
| + virtual const GURL& GetRequestorURL() const OVERRIDE; |
| + virtual bool ShouldShowPostInstallUI() const OVERRIDE; |
| + virtual bool ShouldShowAppInstalledBubble() const OVERRIDE; |
| + virtual content::WebContents* GetWebContents() const OVERRIDE; |
| + virtual scoped_ptr<ExtensionInstallPrompt::Prompt> |
| + CreateInstallPrompt() const OVERRIDE; |
| + virtual bool CheckInlineInstallPermitted( |
| + const base::DictionaryValue& webstore_data, |
| + std::string* error) const OVERRIDE; |
| + virtual bool CheckRequestorPermitted( |
| + const base::DictionaryValue& webstore_data, |
| + std::string* error) const OVERRIDE; |
| + |
| + private: |
| + // content::WebContentsObserver interface implementation. |
| + virtual void WebContentsDestroyed( |
| + content::WebContents* web_contents) OVERRIDE; |
| + |
| + GURL dummy_url_; |
|
asargent_no_longer_on_chrome
2013/08/27 18:22:33
nit: this variable could use a comment since it is
yoshiki
2013/08/28 13:19:04
Done.
|
| + Callback callback_; |
| + |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreAppInstaller); |
| +}; |
| + |
| +} // namespace file_manager |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_WEBSTORE_APP_INSTALLER_H_ |