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

Unified Diff: chrome/renderer/favicon_helper.h

Issue 11411180: move favicon download code from chrome/ into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix order Created 8 years 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
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.cc ('k') | chrome/renderer/favicon_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/favicon_helper.h
diff --git a/chrome/renderer/favicon_helper.h b/chrome/renderer/favicon_helper.h
deleted file mode 100644
index aeccd28a804497a88616f41d2a6898aa9a764579..0000000000000000000000000000000000000000
--- a/chrome/renderer/favicon_helper.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2011 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_RENDERER_FAVICON_HELPER_H_
-#define CHROME_RENDERER_FAVICON_HELPER_H_
-
-#include <string>
-#include <vector>
-
-#include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "content/public/renderer/render_view_observer.h"
-#include "googleurl/src/gurl.h"
-
-struct FaviconURL;
-class SkBitmap;
-
-namespace webkit_glue {
-class MultiResolutionImageResourceFetcher;
-}
-
-// This class deals with favicon downloading.
-// There is one FaviconHelper per RenderView, which is owned by the RenderView.
-class FaviconHelper : public content::RenderViewObserver {
- public:
- explicit FaviconHelper(content::RenderView* render_view);
-
- private:
- virtual ~FaviconHelper();
-
- // Message handler.
- void OnDownloadFavicon(int id, const GURL& image_url, int image_size);
-
- // Requests to download a favicon image. When done, the RenderView
- // is notified by way of DidDownloadFavicon. Returns true if the
- // request was successfully started, false otherwise. id is used to
- // uniquely identify the request and passed back to the
- // DidDownloadFavicon method. If the image has multiple frames, the
- // frame whose size is image_size is returned. If the image doesn't
- // have a frame at the specified size, the first is returned.
- bool DownloadFavicon(int id, const GURL& image_url, int image_size);
-
- // This callback is triggered when DownloadFavicon completes, either
- // succesfully or with a failure. See DownloadFavicon for more
- // details.
- void DidDownloadFavicon(
- int requested_size,
- webkit_glue::MultiResolutionImageResourceFetcher* fetcher,
- const std::vector<SkBitmap>& images);
-
- // Decodes a data: URL image or returns an empty image in case of failure.
- SkBitmap ImageFromDataUrl(const GURL&) const;
-
- // Send a message to update the favicon URL for a page.
- void SendUpdateFaviconURL(int32 routing_id,
- int32 page_id,
- const std::vector<FaviconURL>& urls);
-
- // RenderViewObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void DidStopLoading() OVERRIDE;
- virtual void DidChangeIcon(WebKit::WebFrame* frame,
- WebKit::WebIconURL::Type icon_type) OVERRIDE;
-
- typedef ScopedVector<webkit_glue::MultiResolutionImageResourceFetcher>
- ImageResourceFetcherList;
-
- // ImageResourceFetchers schedule via DownloadImage.
- ImageResourceFetcherList image_fetchers_;
-
- DISALLOW_COPY_AND_ASSIGN(FaviconHelper);
-};
-
-#endif // CHROME_RENDERER_FAVICON_HELPER_H_
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.cc ('k') | chrome/renderer/favicon_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698