Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_INSTALLER_H _ | |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_INSTALLER_H _ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 #include "chrome/browser/extensions/webstore_standalone_installer.h" | |
| 12 #include "content/public/browser/web_contents_observer.h" | |
| 13 | |
| 14 namespace content { | |
| 15 class WebContents; | |
| 16 } | |
| 17 | |
| 18 namespace file_manager { | |
| 19 | |
| 20 // Installer for Files.app. | |
| 21 class FileManagerInstaller | |
| 22 : public extensions::WebstoreStandaloneInstaller, | |
| 23 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.
| |
| 24 public: | |
| 25 typedef extensions::WebstoreStandaloneInstaller::Callback Callback; | |
| 26 | |
| 27 FileManagerInstaller(content::WebContents* web_contents, | |
| 28 const std::string& webstore_item_id, | |
| 29 Profile* profile, | |
| 30 const Callback& callback); | |
| 31 | |
| 32 protected: | |
| 33 friend class base::RefCountedThreadSafe<FileManagerInstaller>; | |
| 34 | |
| 35 virtual ~FileManagerInstaller(); | |
| 36 | |
| 37 // WebstoreStandaloneInstaller implementation. | |
| 38 virtual bool CheckRequestorAlive() const OVERRIDE; | |
| 39 virtual const GURL& GetRequestorURL() const OVERRIDE; | |
| 40 virtual bool ShouldShowPostInstallUI() const OVERRIDE; | |
| 41 virtual bool ShouldShowAppInstalledBubble() const OVERRIDE; | |
| 42 virtual content::WebContents* GetWebContents() const OVERRIDE; | |
| 43 virtual scoped_ptr<ExtensionInstallPrompt::Prompt> | |
| 44 CreateInstallPrompt() const OVERRIDE; | |
| 45 virtual bool CheckInlineInstallPermitted( | |
| 46 const base::DictionaryValue& webstore_data, | |
| 47 std::string* error) const OVERRIDE; | |
| 48 virtual bool CheckRequestorPermitted( | |
| 49 const base::DictionaryValue& webstore_data, | |
| 50 std::string* error) const OVERRIDE; | |
| 51 | |
| 52 private: | |
| 53 // 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.
| |
| 54 virtual void WebContentsDestroyed( | |
| 55 content::WebContents* web_contents) OVERRIDE; | |
| 56 | |
| 57 // Dummy GURL object to return from GetRequestorURL() method. | |
| 58 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.
| |
| 59 Callback callback_; | |
| 60 | |
| 61 DISALLOW_IMPLICIT_CONSTRUCTORS(FileManagerInstaller); | |
| 62 }; | |
| 63 | |
| 64 } // namespace file_manager | |
| 65 | |
| 66 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_INSTALLE R_H_ | |
| OLD | NEW |