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

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

Issue 23945002: file_manager: Move non-binding code to c/b/chromeos/file_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 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:
24 typedef extensions::WebstoreStandaloneInstaller::Callback Callback;
25
26 FileManagerInstaller(content::WebContents* web_contents,
27 const std::string& webstore_item_id,
28 Profile* profile,
29 const Callback& callback);
30
31 protected:
32 friend class base::RefCountedThreadSafe<FileManagerInstaller>;
33
34 virtual ~FileManagerInstaller();
35
36 void OnWebContentsDestroyed(content::WebContents* web_contents);
37
38 // WebstoreStandaloneInstaller implementation.
39 virtual bool CheckRequestorAlive() const OVERRIDE;
40 virtual const GURL& GetRequestorURL() const OVERRIDE;
41 virtual bool ShouldShowPostInstallUI() const OVERRIDE;
42 virtual bool ShouldShowAppInstalledBubble() const OVERRIDE;
43 virtual content::WebContents* GetWebContents() const OVERRIDE;
44 virtual scoped_ptr<ExtensionInstallPrompt::Prompt>
45 CreateInstallPrompt() const OVERRIDE;
46 virtual bool CheckInlineInstallPermitted(
47 const base::DictionaryValue& webstore_data,
48 std::string* error) const OVERRIDE;
49 virtual bool CheckRequestorPermitted(
50 const base::DictionaryValue& webstore_data,
51 std::string* error) const OVERRIDE;
52
53 private:
54 class WebContentsObserver;
55
56 Callback callback_;
57 content::WebContents* web_contents_;
58 scoped_ptr<WebContentsObserver> web_contents_observer_;
59
60 DISALLOW_IMPLICIT_CONSTRUCTORS(FileManagerInstaller);
61 };
62
63 } // namespace file_manager
64
65 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_INSTALLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698