Index: chrome/browser/chromeos/extensions/file_manager/file_manager_installer.h |
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_manager_installer.h b/chrome/browser/chromeos/extensions/file_manager/file_manager_installer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b18b642efeabd312a99593d6c0cd6a7ed0749ed9 |
--- /dev/null |
+++ b/chrome/browser/chromeos/extensions/file_manager/file_manager_installer.h |
@@ -0,0 +1,66 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
hashimoto
2013/08/30 09:09:37
nit: Current style does not have "(c)" in a file h
yoshiki
2013/08/30 09:51:46
Done.
|
+// 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_FILE_MANAGER_INSTALLER_H_ |
+#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_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 FileManagerInstaller |
+ : public extensions::WebstoreStandaloneInstaller, |
+ public content::WebContentsObserver { |
hashimoto
2013/08/30 09:09:37
Our style guide does not allow inheriting multiple
yoshiki
2013/08/30 09:51:46
I didn't know it. Thanks. Done.
|
+ public: |
+ typedef extensions::WebstoreStandaloneInstaller::Callback Callback; |
+ |
+ FileManagerInstaller(content::WebContents* web_contents, |
+ const std::string& webstore_item_id, |
+ Profile* profile, |
+ const Callback& callback); |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<FileManagerInstaller>; |
+ |
+ virtual ~FileManagerInstaller(); |
+ |
+ // WebstoreStandaloneInstaller implementation. |
+ 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 implementation. |
hashimoto
2013/08/30 09:09:37
Why this part is private while WebstoreStandaloneI
yoshiki
2013/08/30 09:51:46
Done.
|
+ virtual void WebContentsDestroyed( |
+ content::WebContents* web_contents) OVERRIDE; |
+ |
+ // Dummy GURL object to return from GetRequestorURL() method. |
+ GURL dummy_url_; |
hashimoto
2013/08/30 09:09:37
How about using GURL::EmptyGURL instead of having
yoshiki
2013/08/30 09:51:46
Done.
|
+ Callback callback_; |
+ |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(FileManagerInstaller); |
+}; |
+ |
+} // namespace file_manager |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_INSTALLER_H_ |