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

Unified Diff: components/suggestions/image_fetcher.h

Issue 543753002: [Suggestions] Move ImageManager to the component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: without browsertest Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/suggestions/image_fetcher.h
diff --git a/components/suggestions/image_fetcher.h b/components/suggestions/image_fetcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..2055122ffa866e0a8c07c4f7b99565a3dcbdaff1
--- /dev/null
+++ b/components/suggestions/image_fetcher.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
huangs 2014/09/22 21:51:13 Remove _IMPL_
Mathieu 2014/09/23 14:59:06 Good catch
+#define COMPONENTS_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
+
+#include <map>
huangs 2014/09/22 21:51:14 These STD includes are not needed.
Mathieu 2014/09/23 14:59:06 Done.
+#include <utility>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "components/suggestions/image_fetcher_delegate.h"
+#include "ui/gfx/image/image_skia.h"
huangs 2014/09/22 21:51:13 Can forward declare SkBitmap ? What's basictypes.
Mathieu 2014/09/23 14:59:06 Done.
+#include "url/gurl.h"
+
+namespace net {
+class URLRequestContextGetter;
huangs 2014/09/22 21:51:13 Unused.
Mathieu 2014/09/23 14:59:06 Done.
+}
+
+namespace suggestions {
+
+// A class used to fetch server images.
+class ImageFetcher {
+ public:
+ ImageFetcher() {}
+ virtual ~ImageFetcher() {}
+
+ virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) = 0;
+
+ virtual void StartOrQueueNetworkRequest(
+ const GURL& url, const GURL& image_url,
+ base::Callback<void(const GURL&, const SkBitmap*)> callback) = 0;
+};
huangs 2014/09/22 21:51:13 DISALLOW_COPY_AND_ASSIGN?
Mathieu 2014/09/23 14:59:06 Done.
+
+} // namespace suggestions
+
+#endif // COMPONENTS_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698