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

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer.h

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/extensions/extension_install_ui.h" 14 #include "chrome/browser/extensions/extension_install_ui.h"
15 #include "chrome/browser/extensions/webstore_install_helper.h"
15 #include "chrome/browser/extensions/webstore_installer.h" 16 #include "chrome/browser/extensions/webstore_installer.h"
16 #include "chrome/browser/extensions/webstore_install_helper.h"
17 #include "content/public/browser/web_contents_observer.h" 17 #include "content/public/browser/web_contents_observer.h"
18 #include "content/public/common/url_fetcher_delegate.h" 18 #include "content/public/common/url_fetcher_delegate.h"
19 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
20 #include "third_party/skia/include/core/SkBitmap.h" 20 #include "third_party/skia/include/core/SkBitmap.h"
21 21
22 class SafeWebstoreResponseParser; 22 class SafeWebstoreResponseParser;
23 23
24 // Manages inline installs requested by a page (downloads and parses metadata 24 // Manages inline installs requested by a page (downloads and parses metadata
25 // from the webstore, shows the install UI, starts the download once the user 25 // from the webstore, shows the install UI, starts the download once the user
26 // confirms). Clients must implement the WebstoreInlineInstaller::Delegate 26 // confirms). Clients must implement the WebstoreInlineInstaller::Delegate
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // 2. OnURLFetchComplete: starts the parsing of data from the webstore 66 // 2. OnURLFetchComplete: starts the parsing of data from the webstore
67 // 3. OnWebstoreResponseParseSuccess: starts the parsing of the manifest and 67 // 3. OnWebstoreResponseParseSuccess: starts the parsing of the manifest and
68 // fetching of icon data. 68 // fetching of icon data.
69 // 4. OnWebstoreParseSuccess: shows the install UI 69 // 4. OnWebstoreParseSuccess: shows the install UI
70 // 5. InstallUIProceed: initiates the .crx download/install 70 // 5. InstallUIProceed: initiates the .crx download/install
71 // 71 //
72 // All flows (whether successful or not) end up in CompleteInstall, which 72 // All flows (whether successful or not) end up in CompleteInstall, which
73 // informs our delegate of success/failure. 73 // informs our delegate of success/failure.
74 74
75 // content::URLFetcherDelegate interface implementation. 75 // content::URLFetcherDelegate interface implementation.
76 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; 76 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
77 77
78 // Client callbacks for SafeWebstoreResponseParser when parsing is complete. 78 // Client callbacks for SafeWebstoreResponseParser when parsing is complete.
79 void OnWebstoreResponseParseSuccess(DictionaryValue* webstore_data); 79 void OnWebstoreResponseParseSuccess(DictionaryValue* webstore_data);
80 void OnWebstoreResponseParseFailure(const std::string& error); 80 void OnWebstoreResponseParseFailure(const std::string& error);
81 81
82 // WebstoreInstallHelper::Delegate interface implementation. 82 // WebstoreInstallHelper::Delegate interface implementation.
83 virtual void OnWebstoreParseSuccess( 83 virtual void OnWebstoreParseSuccess(
84 const std::string& id, 84 const std::string& id,
85 const SkBitmap& icon, 85 const SkBitmap& icon,
86 base::DictionaryValue* parsed_manifest) OVERRIDE; 86 base::DictionaryValue* parsed_manifest) OVERRIDE;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 int rating_count_; 127 int rating_count_;
128 scoped_ptr<DictionaryValue> webstore_data_; 128 scoped_ptr<DictionaryValue> webstore_data_;
129 scoped_ptr<DictionaryValue> manifest_; 129 scoped_ptr<DictionaryValue> manifest_;
130 scoped_refptr<Extension> dummy_extension_; 130 scoped_refptr<Extension> dummy_extension_;
131 SkBitmap icon_; 131 SkBitmap icon_;
132 132
133 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreInlineInstaller); 133 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreInlineInstaller);
134 }; 134 };
135 135
136 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ 136 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_downloader.cc ('k') | chrome/browser/extensions/webstore_inline_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698