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

Unified Diff: chrome/browser/bitmap_fetcher_delegate.h

Issue 155273002: Repurpose NotificationBitmapFetcher to BitmapFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Appease windows bot Created 6 years, 10 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: chrome/browser/bitmap_fetcher_delegate.h
diff --git a/chrome/browser/bitmap_fetcher_delegate.h b/chrome/browser/bitmap_fetcher_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..a91d3206f4d55a5b6b870ab5cdf0b42fe3ca3bdd
--- /dev/null
+++ b/chrome/browser/bitmap_fetcher_delegate.h
@@ -0,0 +1,33 @@
+// 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 CHROME_BROWSER_BITMAP_FETCHER_DELEGATE_H_
+#define CHROME_BROWSER_BITMAP_FETCHER_DELEGATE_H_
+
+#include "url/gurl.h"
+
+class SkBitmap;
+
+namespace chrome {
+
+// A delegate interface for users of BitmapFetcher.
+class BitmapFetcherDelegate {
+ public:
+ BitmapFetcherDelegate() {}
+
+ // This will be called when the bitmap has been requested, whether or not the
+ // request succeeds. |url| is the URL that was originally fetched so we can
+ // match up the bitmap with a specific request. |bitmap| may be NULL if the
+ // image fails to be downloaded or decoded.
+ virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) = 0;
+
+ protected:
+ virtual ~BitmapFetcherDelegate() {}
+
+ DISALLOW_COPY_AND_ASSIGN(BitmapFetcherDelegate);
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_BITMAP_FETCHER_DELEGATE_H_
« no previous file with comments | « chrome/browser/bitmap_fetcher_browsertest.cc ('k') | chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698