Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_manager_installer.h

Issue 23332012: Add a private API method to install a webstore app from Files.app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
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 {
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.
54 virtual void WebContentsDestroyed(
55 content::WebContents* web_contents) OVERRIDE;
56
57 // Dummy GURL object to return from GetRequestorURL() method.
58 GURL dummy_url_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698